move all tests to their own dir
This commit is contained in:
parent
d38808ac65
commit
ce76e14358
22 changed files with 0 additions and 0 deletions
26
src-tests/tests_demo/fixtures_demo.py
Normal file
26
src-tests/tests_demo/fixtures_demo.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
"""
|
||||
This file can be used to define fixtures thate are then used by other tests which
|
||||
depend on [demo]. For this to work
|
||||
|
||||
1. the Runner class of the other test needs to define the depencency as seen
|
||||
by referencing RunnerDemo in the dependencies list:
|
||||
|
||||
from src.tests_demo.runner_demo import RunnerDemo
|
||||
|
||||
class RunnerOther(Runner):
|
||||
dependencies = [RunnerDemo]
|
||||
|
||||
|
||||
2. the specific tests that rely on these fixtures need to import the fixtures.
|
||||
To globally import for all tests in 'other', the import should be done in conftest:
|
||||
|
||||
in 'conftest.py' in 'test_other' dir:
|
||||
from src.tests_demo.fixtures_demo import demo_fixture
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def demo_fixture():
|
||||
return ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue