Commit d444f3c3 authored by Matias Guijarro's avatar Matias Guijarro
Browse files

tests: aliases: use tmpdir to store scan files in aliases tests

Make tests reproducible, since a new file in a new directory is
created each time.
parent b2ab158c
......@@ -83,10 +83,13 @@ a2scan_dump = """{a2scan}
"""
def test_alias_hdf5_file_items(alias_session):
def test_alias_hdf5_file_items(alias_session, scan_tmpdir):
env_dict, session = alias_session
# put scan file in a tmp directory
env_dict["SCAN_SAVING"].base_path = str(scan_tmpdir)
s = scans.a2scan(
env_dict["robyy"],
0,
......@@ -106,7 +109,6 @@ def test_alias_hdf5_file_items(alias_session):
)
scan_dump = h5dump(s.writer.filename)
ref_a2scan_dump = a2scan_dump.split("\n")
i = -1
......@@ -148,10 +150,13 @@ con_scan_dump = """{scan}
"""
def test_alias_hdf5_continuous_scan(alias_session):
def test_alias_hdf5_continuous_scan(alias_session, scan_tmpdir):
env_dict, session = alias_session
# put scan file in a tmp directory
env_dict["SCAN_SAVING"].base_path = str(scan_tmpdir)
diode = session.config.get("diode")
diode.set_alias("myDiode")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment