diff --git a/tests/test_main.py b/tests/test_main.py index c747c461..794a811c 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -22,10 +22,9 @@ def test_count_occurrences(phrase, letter, count): def test_removed_comment(): -import app -with open(app.main.__file__, "r") as f: - file_content = f.read() - comment = re.compile("# write your code here") - assert not comment.search( - file_content - ), "You have to remove the unnecessary comment '# write your code here'" + import app + with open(app.main.__file__, "r") as f: + file_content = f.read() + assert "# write your code here" not in file_content, \ + "You have to remove the unnecessary comment '# write your code here'" +