tests: use updated conftest from pymplate, this allows to run individual test modules properly
e.g. pytest --pyargs my.core.tests.test_get_files
This commit is contained in:
parent
b615ba10b1
commit
3aebc573e8
2 changed files with 54 additions and 2 deletions
|
@ -175,12 +175,17 @@ TMP = tempfile.gettempdir()
|
|||
test_path = Path(TMP) / 'hpi_test'
|
||||
|
||||
|
||||
def setup():
|
||||
@pytest.fixture(autouse=True)
|
||||
def prepare():
|
||||
teardown()
|
||||
test_path.mkdir()
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
teardown()
|
||||
|
||||
|
||||
def teardown():
|
||||
def teardown() -> None:
|
||||
if test_path.is_dir():
|
||||
shutil.rmtree(test_path)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue