Skip to content

Commit c51f816

Browse files
committed
one more check
1 parent 7778d2a commit c51f816

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/vakantieTest.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
def expectedOutput(target, args):
1010
# if language == "nl":
11-
return f"print correct: 'Jouw vakantie kost: {target}' bij {str(args)} als invoer."
11+
return f"print correct 'Jouw vakantie kost: {target}' bij {str(args)} als invoer"
1212
# else:
1313
# return f"Print correct: 'Your vacation costs: {target}' for {str(args)} as input."
1414

@@ -59,7 +59,7 @@ def testMethod():
5959

6060
test.test = testMethod
6161
test.description = lambda : (
62-
"de functie 'travel_costs' berekent correct de vervoerkosten."
62+
"de functie 'travel_costs' berekent correct de vervoerkosten"
6363
# if language == "nl" else
6464
# "The function 'travel_costs' calculates the costs of travel correctly."
6565
)
@@ -96,3 +96,14 @@ def testMethod():
9696

9797
test.test = testMethod
9898
test.description = lambda: expectedOutput(target, args)
99+
100+
@t.test(5)
101+
def calculatesCostsAndRoundsCorrectly(test):
102+
target = "371"
103+
args = [1425, 0]
104+
def testMethod():
105+
output = lib.outputOf(test.fileName, stdinArgs=args, overwriteAttributes = [("__name__", "__main__")])
106+
return asserts.contains(output.strip(), target)
107+
108+
test.test = testMethod
109+
test.description = lambda: expectedOutput(target, args)

0 commit comments

Comments
 (0)