Skip to content

Commit

Permalink
added test whoch checks if the comment was removed
Browse files Browse the repository at this point in the history
  • Loading branch information
Nattalli committed Sep 7, 2022
1 parent 6daad60 commit 3dc5867
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest
import re

import app.main

Expand Down Expand Up @@ -89,3 +90,12 @@ def test_variables_added_to_the_correct_list():
assert is_immutable(variable) is True, (
f"{variable} should be in 'mutable' list"
)


def test_removed_comment():
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'"

0 comments on commit 3dc5867

Please sign in to comment.