import pytest
import os
from pathlib import Path

@pytest.fixture
def data_path():
    try:
        p = os.environ['CREADER_TEST_DATA']
    except KeyError:
        raise KeyError("CREADER_TEST_DATA needs to be set before running tests")
    return Path(p)