Skip to content

Commit 19fe213

Browse files
committed
fix
1 parent 4b6029a commit 19fe213

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/string_functionsTest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
from _basics_no_listcomp import *
33
from _static_analysis import *
44

5+
import ast
6+
57
@t.passed(doctest_ok)
68
def 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)
1418
def test_repeat(test):

0 commit comments

Comments
 (0)