Skip to content

Commit 858ac8b

Browse files
authored
Update test_main.py
1 parent ee2952f commit 858ac8b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/test_main.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pytest
2-
import re
32

43
from app.main import count_occurrences
54

@@ -26,7 +25,6 @@ def test_removed_comment():
2625
import app
2726
with open(app.main.__file__, "r") as f:
2827
file_content = f.read()
29-
comment = re.compile("# write your code here")
30-
assert not comment.search(
31-
file_content
32-
), "You have to remove the unnecessary comment '# write your code here'"
28+
assert "# write your code here" not in file_content, \
29+
"You have to remove the unnecessary comment '# write your code here'"
30+

0 commit comments

Comments
 (0)