"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "interprocedural/test/callResolutionTest.ml" between
pyre-check-0.0.54.tar.gz and pyre-check-0.0.55.tar.gz

About: Pyre is a performant type checker for Python (ships with Pysa, a security focused static analysis tool).

callResolutionTest.ml  (pyre-check-0.0.54):callResolutionTest.ml  (pyre-check-0.0.55)
skipping to change at line 217 skipping to change at line 217
@classmethod @classmethod
@lru_cache() @lru_cache()
def m(cls, x: int) -> int: def m(cls, x: int) -> int:
return x return x
|} |}
~expression:"test.C.m" ~expression:"test.C.m"
~expected: ~expected:
[ [
( `Method { Callable.class_name = "test.C"; method_name = "m" }, ( `Method { Callable.class_name = "test.C"; method_name = "m" },
Some (Type.meta (Type.Primitive "test.C")) ); Some (Type.meta (Type.Primitive "test.C")) );
];
assert_resolved
~source:
{|
class C:
def __call__(self, arg):
return arg
c: C = C()
|}
~expression:"test.c"
~expected:
[
( `Method { Callable.class_name = "test.C"; method_name = "__call__" },
Some (Type.Primitive "test.C") );
] ]
let () = let () =
"callResolution" "callResolution"
>::: [ >::: [
"get_property_callable" >:: test_get_property_callable; "get_property_callable" >:: test_get_property_callable;
"resolve_target" >:: test_resolve_target; "resolve_target" >:: test_resolve_target;
"resolve_ignoring_optional" >:: test_resolve_ignoring_optional; "resolve_ignoring_optional" >:: test_resolve_ignoring_optional;
] ]
|> Test.run |> Test.run
 End of changes. 1 change blocks. 
0 lines changed or deleted 14 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)