""" test fixtures """ from pathlib import Path import pytest EXAMPLE_DIR_WO_PARAMS = "mtp_wo_parameters" EXAMPLE_DIR_WITH_PARAMS = "mtp_with_parameters" @pytest.fixture def example_dir(request): root_dir = Path(request.config.rootdir) yield root_dir / "example_data" @pytest.fixture def example_file(example_dir): data_dir = example_dir / EXAMPLE_DIR_WO_PARAMS yield data_dir / "160218_SG2-013-001_Regen1_Cy3-100_1_A1_1.csv" @pytest.fixture def exposure_df(): from pandas import DataFrame yield DataFrame(data={"Exposure.Id": [1, 2, 3]}) @pytest.fixture def dir_for_caching(tmpdir, example_file): import shutil temp_path = Path(tmpdir) dest = temp_path / example_file.name shutil.copy(example_file, dest) yield temp_path