File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 22from _basics_no_listcomp import *
33from _static_analysis import *
44
5+ import ast
6+
57@t .passed (doctest_ok )
68def has_functions ():
79 """alle gevraagde functies zijn aanwezig"""
810 assert "repeat" in static .getFunctionDefinitions (), "`repeat` is niet aanwezig"
911 assert "total_length" in static .getFunctionDefinitions (), "`total_length` is niet aanwezig"
10- assert not (has_string ("if(" ) or has_string ("if " )), "let op dat je geen `if` gebruikt"
11- assert not (has_string ("for " ) or has_string ("while " )), "let op dat je geen `for` of `while` gebruikt"
12+
13+ assert ast .If not in static .AbstractSyntaxTree ()
14+ assert ast .While not in static .AbstractSyntaxTree ()
15+ assert ast .For not in static .AbstractSyntaxTree ()
1216
1317@t .passed (has_functions )
1418def test_repeat (test ):
You can’t perform that action at this time.
0 commit comments