Skip to content

Commit

Permalink
'--no-pager' and normal output should be the same, so use same refere…
Browse files Browse the repository at this point in the history
…nce file.
  • Loading branch information
domdfcoding committed Oct 17, 2024
1 parent 8ef0899 commit 76af4da
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 11,362 deletions.
11 changes: 9 additions & 2 deletions tests/test_cli/test_show.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# stdlib
import string
import sys

# 3rd party
Expand Down Expand Up @@ -137,10 +138,11 @@ def test_requirements_concise(
assert result.exit_code == 0
result.check_stdout(advanced_file_regression, extension=".tree")

@pytest.mark.usefixtures("tmp_repo", "py_version", "fixed_version_number")
@pytest.mark.usefixtures("tmp_repo", "fixed_version_number")
@version_specific
def test_requirements_no_pager(
self,
py_version: str,
advanced_file_regression: AdvancedFileRegressionFixture,
):

Expand All @@ -153,7 +155,12 @@ def test_requirements_no_pager(
)

assert result.exit_code == 0
result.check_stdout(advanced_file_regression, extension=".tree")
py_version = py_version.translate(str.maketrans({char: '_' for char in string.punctuation}))
result.check_stdout(
advanced_file_regression,
extension=".tree",
basename=f"test_requirements_{py_version}_",
)


@pypy_windows_dulwich
Expand Down
623 changes: 0 additions & 623 deletions tests/test_cli/test_show_/test_requirements_no_pager_3_10_.tree

This file was deleted.

623 changes: 0 additions & 623 deletions tests/test_cli/test_show_/test_requirements_no_pager_3_11__.tree

This file was deleted.

621 changes: 0 additions & 621 deletions tests/test_cli/test_show_/test_requirements_no_pager_3_13__.tree

This file was deleted.

1,104 changes: 0 additions & 1,104 deletions tests/test_cli/test_show_/test_requirements_no_pager_3_6_.tree

This file was deleted.

1,095 changes: 0 additions & 1,095 deletions tests/test_cli/test_show_/test_requirements_no_pager_3_7_.tree

This file was deleted.

972 changes: 0 additions & 972 deletions tests/test_cli/test_show_/test_requirements_no_pager_3_8_.tree

This file was deleted.

623 changes: 0 additions & 623 deletions tests/test_cli/test_show_/test_requirements_no_pager_3_9_.tree

This file was deleted.

13 changes: 10 additions & 3 deletions tests/test_cli/test_show_windows.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# stdlib
import string
import sys

# 3rd party
Expand Down Expand Up @@ -41,8 +42,8 @@
@not_pypy("Output differs on PyPy.")
class TestShowRequirements:

@version_specific
@pytest.mark.usefixtures("tmp_repo", "py_version", "fixed_version_number")
@version_specific
def test_requirements(
self,
advanced_file_regression: AdvancedFileRegressionFixture,
Expand Down Expand Up @@ -83,10 +84,11 @@ def test_requirements_concise(
assert result.exit_code == 0
result.check_stdout(advanced_file_regression, extension=".tree")

@pytest.mark.usefixtures("tmp_repo", "py_version", "fixed_version_number")
@pytest.mark.usefixtures("tmp_repo", "fixed_version_number")
@version_specific
def test_requirements_no_pager(
self,
py_version: str,
advanced_file_regression: AdvancedFileRegressionFixture,
):

Expand All @@ -99,4 +101,9 @@ def test_requirements_no_pager(
)

assert result.exit_code == 0
result.check_stdout(advanced_file_regression, extension=".tree")
py_version = py_version.translate(str.maketrans({char: '_' for char in string.punctuation}))
result.check_stdout(
advanced_file_regression,
extension=".tree",
basename=f"test_requirements_{py_version}_",
)
Loading

0 comments on commit 76af4da

Please sign in to comment.