5
5
from _basics_no_listcomp import *
6
6
7
7
@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 )
8
16
@t .test (10 )
9
17
def checks_convert_temperature (test ):
10
18
"""functie 'convert_temperature' werkt correct"""
@@ -16,7 +24,7 @@ def testMethod():
16
24
return False
17
25
test .test = testMethod
18
26
19
- @t .passed (doctest_ok )
27
+ @t .passed (has_functions )
20
28
@t .test (20 )
21
29
def check_overall1 (test ):
22
30
"""print juiste tabel voor F naar C met start 0, eind 9 en stapgrootte 3"""
@@ -26,7 +34,7 @@ def testMethod():
26
34
return asserts .exact (output .strip (), "F | C\n 0 | -17\n 3 | -16\n 6 | -14\n 9 | -12" )
27
35
test .test = testMethod
28
36
29
- @t .passed (doctest_ok )
37
+ @t .passed (has_functions )
30
38
@t .test (30 )
31
39
def check_overall2 (test ):
32
40
"""print juiste tabel voor C naar F met start 0, eind 20 en stapgrootte 5"""
@@ -36,7 +44,7 @@ def testMethod():
36
44
return asserts .exact (output .strip (), "C | F\n 0 | 32\n 5 | 41\n 10 | 50\n 15 | 59\n 20 | 68" )
37
45
test .test = testMethod
38
46
39
- @t .passed (doctest_ok )
47
+ @t .passed (has_functions )
40
48
@t .test (40 )
41
49
def check_overall3 (test ):
42
50
"""print juiste tabel voor f (lowercase) naar C met start 0, eind 9 en stapgrootte 3"""
0 commit comments