jrnl/tests/step_defs/conftest.py
Jonathan Wren c5a7d7027c Move pytest-bdd code into separate files
Now that all the tests are passing, this breaks them up into a few
different files to make everything more organized.

Note: Pyflakes is complaining about some unused import statements.
2021-07-03 15:49:18 -07:00

25 lines
677 B
Python

# Copyright (C) 2012-2021 jrnl contributors
# License: https://www.gnu.org/licenses/gpl-3.0.html
from jrnl.os_compat import on_windows
from pytest import mark
from .fixtures import *
from .given_steps import *
from .when_steps import *
from .then_steps import *
def pytest_bdd_apply_tag(tag, function):
if tag == "skip_win":
marker = mark.skipif(on_windows(), reason="Skip test on Windows")
elif tag == "skip_editor":
marker = mark.skip(
reason="Skipping editor-related test. We should come back to this!"
)
else:
# Fall back to pytest-bdd's default behavior
return None
marker(function)
return True