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 Sep 12, 2022
1 parent c9f84ab commit 305706e
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 @@ -216,11 +216,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 abilty 3\n'
'4 abilty 4\n'
'5 ackward 5\n'
'6 ackward 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\nabilty\r\nackward ')
assert cs.main('-I', f.name, bad_name) == 1


Expand Down

0 comments on commit 305706e

Please sign in to comment.