diff --git a/tests/test_DM.py b/tests/test_DM.py index 2c0bd8f..255b49b 100644 --- a/tests/test_DM.py +++ b/tests/test_DM.py @@ -1,12 +1,15 @@ +from pathlib import Path import pytest -from xicam.NCEM.ingestors.DMPlugin import ingest_NCEM_DM -# TODO: add fixture that writes temp data file with ncempy for tests +from xicam.NCEM.ingestors.DMPlugin import ingest_NCEM_DM + @pytest.fixture def DM_path(): - return "/home/rp/data/NCEM/01_TimeSeriesImages_20images(1).dm3" + """DM files must be written from DM.""" + dPath = Path.home() + return str(dPath / Path('data') / Path('01_TimeSeriesImages_20images.dm3')) def test_slicing(DM_path): diff --git a/tests/test_EMD.py b/tests/test_EMD.py index 099f873..eb2f60b 100644 --- a/tests/test_EMD.py +++ b/tests/test_EMD.py @@ -9,26 +9,12 @@ from xicam.NCEM.ingestors.EMDPlugin import ingest_NCEM_EMD, _get_slice from databroker.in_memory import BlueskyInMemoryCatalog -# TODO: move file creation to fixture - @pytest.fixture -def EMD_path(): - """ - Write a small Berkeley EMD file to a tempfile - - """ - #return "/home/rp/data/NCEM/Acquisition_18.emd" - dd, _, _ = np.mgrid[0:30, 0:40, 0:50] - dd = dd.astype('