Skip to content

Commit

Permalink
Reformat path_separator's decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Mar 4, 2024
1 parent 2f00d54 commit d64c936
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions coincidence/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,14 @@ def fixed_datetime(monkeypatch) -> Iterator:
yield


_skip_forward_mark = pytest.mark.skipif(os.sep == '\\', reason=r"Output differs on platforms where os.sep == '\\'")
_skip_backward_mark = pytest.mark.skipif(os.sep == '/', reason="Output differs on platforms where os.sep == '/'")


@pytest.fixture(
params=[
pytest.param(
'/',
id="forward",
marks=pytest.mark.
skipif(os.sep == '\\', reason=r"Output differs on platforms where os.sep == '\\'")
),
pytest.param(
'\\',
id="backward",
marks=pytest.mark.
skipif(os.sep == '/', reason="Output differs on platforms where os.sep == '/'")
),
pytest.param('/', id="forward", marks=_skip_forward_mark),
pytest.param('\\', id="backward", marks=_skip_backward_mark),
]
)
def path_separator(request) -> str:
Expand Down

0 comments on commit d64c936

Please sign in to comment.