Skip to content

Commit 78fc179

Browse files
committed
Use separate reference files for different path separators.
1 parent 61e5a55 commit 78fc179

File tree

43 files changed

+30
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+30
-5
lines changed

tests/conftest.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# stdlib
2+
import os
3+
14
# 3rd party
25
import pytest
36
from coincidence.selectors import only_version
@@ -15,3 +18,23 @@
1518
)
1619
def version(request):
1720
return request.param
21+
22+
23+
@pytest.fixture(
24+
params=[
25+
pytest.param(
26+
"forward",
27+
marks=pytest.mark.skipif(
28+
os.sep == '\\', reason=r"Output differs on platforms where os.sep == '\\'"
29+
)
30+
),
31+
pytest.param(
32+
"backward",
33+
marks=pytest.mark.skipif(
34+
os.sep == '/', reason="Output differs on platforms where os.sep == '/'"
35+
)
36+
),
37+
]
38+
)
39+
def os_sep(request):
40+
return request.param

tests/test_tox_envlist.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def test_tox_envlist(
3535
command: List[str],
3636
toxinidir: PathPlus,
3737
version: str,
38+
os_sep,
3839
advanced_file_regression: AdvancedFileRegressionFixture,
3940
):
4041

@@ -47,7 +48,7 @@ def test_tox_envlist(
4748
advanced_file_regression.check(prepare_stdout(capout.out, toxinidir))
4849

4950

50-
def test_tox_envlist_no_command(capsys, toxinidir: PathPlus):
51+
def test_tox_envlist_no_command(capsys, toxinidir: PathPlus, os_sep):
5152
# The output varies depending on the versions of python installed on the host
5253

5354
try:
@@ -59,7 +60,7 @@ def test_tox_envlist_no_command(capsys, toxinidir: PathPlus):
5960
assert capout.out
6061

6162

62-
def test_tox_envlist_test(capsys, toxinidir: PathPlus):
63+
def test_tox_envlist_test(capsys, toxinidir: PathPlus, os_sep):
6364
# The output varies depending on the versions of python installed on the host
6465

6566
try:
@@ -71,7 +72,7 @@ def test_tox_envlist_test(capsys, toxinidir: PathPlus):
7172
assert capout.out
7273

7374

74-
def test_tox_envlist_unknown(capsys, toxinidir: PathPlus):
75+
def test_tox_envlist_unknown(capsys, toxinidir: PathPlus, os_sep):
7576
# The output varies depending on the versions of python installed on the host
7677

7778
try:

0 commit comments

Comments
 (0)