Skip to content

Commit

Permalink
Cover the same cases in test_ignore_dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackenmen committed Mar 25, 2021
1 parent 22241c6 commit 7806573
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions codespell_lib/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,17 @@ def test_ignore_dictionary(tmpdir, capsys):
"""Test ignore dictionary functionality."""
d = str(tmpdir)
with open(op.join(d, 'bad.txt'), 'w') as f:
f.write('1 abandonned 1\n2 abandonned 2\nabondon\n')
f.write('1 abandonned 1\n'
'2 abandonned 2\n'
'3 abanndoned 3\n'
'4 abanndoned 4\n'
'5 abanndonned 5\n'
'6 abanndonned 6\n'
'abondon\n')
bad_name = f.name
assert cs.main(bad_name) == 3
assert cs.main(bad_name) == 7
with open(op.join(d, 'ignore.txt'), 'w') as f:
f.write('abandonned\n')
f.write('abandonned\nabanndoned\r\nabanndonned ')
assert cs.main('-I', f.name, bad_name) == 1


Expand Down

0 comments on commit 7806573

Please sign in to comment.