Skip to content

Commit

Permalink
Merge pull request mate-academy#76 from mate-academy/Nattalli-patch-1
Browse files Browse the repository at this point in the history
added test about comment
  • Loading branch information
Nattalli authored Sep 8, 2022
2 parents 37cd6ad + af75377 commit 5997554
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
Expand Up @@ -19,3 +19,13 @@ def test_count_occurrences(phrase, letter, count):
f"Function 'count_occurrences' should return {count}, "
f"when 'phrase'='{phrase}' and 'letter'='{letter}'"
)


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'"

0 comments on commit 5997554

Please sign in to comment.