From 0a0b308dcc60a21f880beafdf293208151ce8e87 Mon Sep 17 00:00:00 2001 From: Apoorva Ranade Date: Fri, 26 Feb 2021 19:10:23 +0530 Subject: [PATCH 1/2] Modifying Tests --- src/test/data/pa1/student_contributed/good.py | 42 ++++++++----------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/src/test/data/pa1/student_contributed/good.py b/src/test/data/pa1/student_contributed/good.py index 88f20ca..000fffe 100644 --- a/src/test/data/pa1/student_contributed/good.py +++ b/src/test/data/pa1/student_contributed/good.py @@ -1,11 +1,24 @@ +class Foo(object): + x:int = 0 + + def __init__(self:"Foo", x:int): + self.x = x + + def bar(y:int): + print("Hello World!",self.x+y) + y = 10 + +def get_stones(name:str)->str: + color=["Red","Blue"] + stones=["Mind","Soul"] + def map_name(nm:str)->str: + return stones[color.index(nm)] + return map_name(name) -print("Hi") def fun1(): def fun2(): print("Hello") fun2() - -print("World") def fun3(): def fun4(): @@ -51,38 +64,17 @@ if True: else: print("World") -class Foo(object): - x:int = 0 - def __init__(self:"Foo", x:int): - self.x = x - - def bar(y:int)->None: - print("Hello World!",self.x+y) - y = 10 f = Foo(1) print(f.x) f.bar(4) -a=[[[1],[2]][[3],[4]]] +a=[[[1],[2]],[[3],[4]]] print(a[0][0][1]*a[1][1][0]) multiline_string="Hi World, Here I am" -""" -This is a -multi-line comment. -""" - - -def get_stones(name:str)->str: - color=['Red','Blue'] - stones=['Mind','Soul'] - def map_name(nm:str)->str: - return stones[color.index(nm)] - return map_name(name) - stone="Blue" print(get_stones(stone)) \ No newline at end of file From d7a9aab8a47eb6177d0a00bf532e7af7e3c5fb43 Mon Sep 17 00:00:00 2001 From: Apoorva Ranade Date: Fri, 26 Feb 2021 19:14:42 +0530 Subject: [PATCH 2/2] Working tests --- src/test/data/pa1/student_contributed/good.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/test/data/pa1/student_contributed/good.py b/src/test/data/pa1/student_contributed/good.py index 000fffe..093076f 100644 --- a/src/test/data/pa1/student_contributed/good.py +++ b/src/test/data/pa1/student_contributed/good.py @@ -9,26 +9,26 @@ class Foo(object): y = 10 def get_stones(name:str)->str: - color=["Red","Blue"] - stones=["Mind","Soul"] def map_name(nm:str)->str: return stones[color.index(nm)] + color=["Red","Blue"] + stones=["Mind","Soul"] return map_name(name) -def fun1(): - def fun2(): +def funa(): + def funb(): print("Hello") - fun2() + funb() -def fun3(): - def fun4(): +def fund(): + def fune(): print("Hello") c = 4 + 5 -def fun5(): - c = 6 - def fun6(): +def funf(): + def fung(): print("Hello") + c = 6 c = 4 + 5