From e47bc2df75e9b2f46a34bf587c367c33cfe374c6 Mon Sep 17 00:00:00 2001 From: Sanjar Ahmadov Date: Tue, 23 Mar 2021 22:09:18 -0400 Subject: [PATCH] Added bad_* tests which are failing to pass --- src/test/data/pa2/student_contributed/bad_semantic.py | 10 ++++++++++ src/test/data/pa2/student_contributed/bad_types.py | 3 +++ 2 files changed, 13 insertions(+) diff --git a/src/test/data/pa2/student_contributed/bad_semantic.py b/src/test/data/pa2/student_contributed/bad_semantic.py index a7a1b23..490a475 100644 --- a/src/test/data/pa2/student_contributed/bad_semantic.py +++ b/src/test/data/pa2/student_contributed/bad_semantic.py @@ -2,3 +2,13 @@ x:int = 1 x:int = 2 x + +def fun_1() -> bool: + if True: + if True: + return True + # All path should return, not just one + + +fun_1() + diff --git a/src/test/data/pa2/student_contributed/bad_types.py b/src/test/data/pa2/student_contributed/bad_types.py index 7d76df7..91ba352 100644 --- a/src/test/data/pa2/student_contributed/bad_types.py +++ b/src/test/data/pa2/student_contributed/bad_types.py @@ -1,2 +1,5 @@ x:int = True x + [1] + +y:bool = False +x = y = z = "Error"