Skip to content

Commit 4f4263d

Browse files
committed
checks temp
1 parent f0ff2d9 commit 4f4263d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tests/temperatuurTest.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
from _basics_no_listcomp import *
66

77
@t.passed(doctest_ok)
8+
def has_functions():
9+
"""alle gevraagde functies zijn aanwezig"""
10+
assert not_in_code(ast.Set)
11+
assert not_in_code(ast.List)
12+
assert not_in_code(ast.Tuple)
13+
assert not_in_code(ast.Dict)
14+
15+
@t.passed(has_functions)
816
@t.test(10)
917
def checks_convert_temperature(test):
1018
"""functie 'convert_temperature' werkt correct"""
@@ -16,7 +24,7 @@ def testMethod():
1624
return False
1725
test.test = testMethod
1826

19-
@t.passed(doctest_ok)
27+
@t.passed(has_functions)
2028
@t.test(20)
2129
def check_overall1(test):
2230
"""print juiste tabel voor F naar C met start 0, eind 9 en stapgrootte 3"""
@@ -26,7 +34,7 @@ def testMethod():
2634
return asserts.exact(output.strip(), "F | C\n 0 | -17\n 3 | -16\n 6 | -14\n 9 | -12")
2735
test.test = testMethod
2836

29-
@t.passed(doctest_ok)
37+
@t.passed(has_functions)
3038
@t.test(30)
3139
def check_overall2(test):
3240
"""print juiste tabel voor C naar F met start 0, eind 20 en stapgrootte 5"""
@@ -36,7 +44,7 @@ def testMethod():
3644
return asserts.exact(output.strip(), "C | F\n 0 | 32\n 5 | 41\n 10 | 50\n 15 | 59\n 20 | 68")
3745
test.test = testMethod
3846

39-
@t.passed(doctest_ok)
47+
@t.passed(has_functions)
4048
@t.test(40)
4149
def check_overall3(test):
4250
"""print juiste tabel voor f (lowercase) naar C met start 0, eind 9 en stapgrootte 3"""

0 commit comments

Comments
 (0)