File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -14,19 +14,21 @@ def testMethod():
14
14
return False
15
15
16
16
test .test = testMethod
17
- test .description = lambda : "'check_coin' works correctly. "
17
+ test .description = lambda : "'check_coin' works correctly"
18
18
19
19
@t .test (1 )
20
20
def checks_due (test ):
21
21
def testMethod ():
22
22
due = lib .getFunction ("determine_due" , test .fileName )
23
+ if due (50 , 20 ) == 30 :
24
+ return False , "function accepts a coin of 20, but this coin should not exist"
23
25
if due (50 , 25 ) == 25 and due (50 , 20 ) == 50 and due (50 , 10 ) == 40 :
24
26
return True
25
27
else :
26
28
return False
27
29
28
30
test .test = testMethod
29
- test .description = lambda : "'determine_due' works correctly. "
31
+ test .description = lambda : "'determine_due' works correctly"
30
32
31
33
@t .test (2 )
32
34
def checks_main (test ):
@@ -37,4 +39,4 @@ def testMethod():
37
39
return asserts .exact (output .strip ()[- 2 :], answer )
38
40
39
41
test .test = testMethod
40
- test .description = lambda : "The change (10) is correctly calculated after inserting 25, 10, en 25 cents. "
42
+ test .description = lambda : "the change (10) is correctly calculated after inserting 25, 10, and 25 cents"
You can’t perform that action at this time.
0 commit comments