@@ -17,18 +17,18 @@ def testMethod():
1717 test .description = lambda : "'convert_temperature' works correctly."
1818
1919
20- @t .test (1 )
21- def checks_capital (test ):
22- def testMethod ():
23- convert_temperature = lib .getFunction ("convert_temperature" , test .fileName )
24- if (convert_temperature ("C" , 10 ) and convert_temperature ("c" , 10 ) and
25- convert_temperature ("F" , 9 ) and convert_temperature ("f" , 9 )):
26- return True
27- else :
28- return False
29-
30- test .test = testMethod
31- test .description = lambda : "All of 'C', 'F', 'c' and 'f' are accepted by the program."
20+ # @t.test(1)
21+ # def checks_capital(test):
22+ # def testMethod():
23+ # convert_temperature = lib.getFunction("convert_temperature", test.fileName)
24+ # if (convert_temperature("C", 10) and convert_temperature("c", 10) and
25+ # convert_temperature("F", 9) and convert_temperature("f", 9)):
26+ # return True
27+ # else:
28+ # return False
29+ #
30+ # test.test = testMethod
31+ # test.description = lambda : "All of 'C', 'F', 'c' and 'f' are accepted by the program."
3232
3333
3434@t .test (2 )
@@ -51,3 +51,14 @@ def testMethod():
5151
5252 test .test = testMethod
5353 test .description = lambda : "The correct table is printed when converting C to F with 0 as begin temperature, 20 as end temperature and 5 as step size."
54+
55+ @t .test (4 )
56+ def check_overall1 (test ):
57+ def testMethod ():
58+ output = lib .outputOf (test .fileName , stdinArgs = ["f" , 0 , 9 , 3 ],
59+ overwriteAttributes = [("__name__" , "__main__" )])
60+ return asserts .exact (output .strip (), "F | C\n 0 | -17\n 3 | -16\n 6 | -14\n 9 | -12" )
61+
62+ test .test = testMethod
63+ test .description = lambda : "The correct table is printed when converting f (lowercase) to C with 0 as begin temperature, 9 as end temperature and 3 as step size."
64+
0 commit comments