Use a pytest fixture to locate the testdata directory

This commit is contained in:
2019-04-02 21:34:34 +02:00
parent 85cc3f523e
commit d6d6bf1ac7
2 changed files with 20 additions and 11 deletions

11
tests/conftest.py Normal file
View File

@@ -0,0 +1,11 @@
"""Helpers for pytest tests."""
import os
import pytest
@pytest.fixture(scope='session')
def testdata_dir():
"""Path to the testdata directory."""
return os.path.join(os.path.dirname(__file__), 'testdata')