"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "analysis/test/integration/iterableTest.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).

iterableTest.ml  (pyre-check-0.0.54):iterableTest.ml  (pyre-check-0.0.55)
skipping to change at line 23 skipping to change at line 23
assert_type_errors assert_type_errors
{| {|
class Container: class Container:
def __getitem__(self, item: str) -> None: def __getitem__(self, item: str) -> None:
pass pass
def foo(x: str) -> None: def foo(x: str) -> None:
if x in Container(): if x in Container():
pass pass
|} |}
[]; ["Unsupported operand [58]: `in` is not supported for right operand type `Co ntainer`."];
assert_type_errors assert_type_errors
{| {|
class NonContainer: class NonContainer:
pass pass
def foo(x: str) -> None: def foo(x: str) -> None:
if x in NonContainer(): if x in NonContainer():
pass pass
|} |}
["Undefined attribute [16]: `NonContainer` has no attribute `__getitem__`."] ; ["Unsupported operand [58]: `in` is not supported for right operand type `No nContainer`."];
() ()
let () = "iterable" >::: ["check_contains" >:: test_check_contains] |> Test.run let () = "iterable" >::: ["check_contains" >:: test_check_contains] |> Test.run
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

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