Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fix to tests. #41

Merged
merged 1 commit into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add missing commas.
  • Loading branch information
joseph-roitman committed Sep 14, 2021
commit 1b1e7867e87ed04fe5de3c7e87e98f45e6c4ab0d
4 changes: 2 additions & 2 deletions pytest_snapshot/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ def pytest_addoption(parser):
group.addoption(
'--snapshot-update',
action='store_true',
help='Update snapshots.'
help='Update snapshots.',
)
group.addoption(
'--allow-snapshot-deletion',
action='store_true',
help='Allow snapshot deletion when updating snapshots.'
help='Allow snapshot deletion when updating snapshots.',
)


Expand Down
4 changes: 2 additions & 2 deletions tests/test_assert_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def test_sth(snapshot):
'all-bytes',
'unicode',
'whitespace',
'slash-r'
'slash-r',
])
def test_assert_match_edge_cases(testdir, basic_case_dir, tested_value):
"""
Expand Down Expand Up @@ -375,6 +375,6 @@ def test_sth(snapshot):
result = testdir.runpytest('-v', '--snapshot-update')
result.stdout.fnmatch_lines([
'*::test_sth FAILED*',
'E* ValueError: Snapshot testing strings containing "\\r" is not supported.'
'E* ValueError: Snapshot testing strings containing "\\r" is not supported.',
])
assert result.ret == 1
2 changes: 1 addition & 1 deletion tests/test_assert_match_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,6 @@ def test_sth(snapshot):
result = testdir.runpytest('-v', '--snapshot-update')
result.stdout.fnmatch_lines([
'*::test_sth FAILED*',
'E* ValueError: Invalid snapshot name: subdir/obj1.txt'
'E* ValueError: Invalid snapshot name: subdir/obj1.txt',
])
assert result.ret == 1
6 changes: 3 additions & 3 deletions tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ def test_simple_version_parse_success(version_str, version):
'',
'rc1.2.3',
'1!2.3.4',
'a.b.c'
'1.2'
'1.2.'
'a.b.c',
'1.2',
'1.2.',
])
def test_simple_version_parse_error(version_str):
with pytest.raises(ValueError):
Expand Down