Skip to content

Commit

Permalink
Fix tests for remaining detectors to account for new changes to facto…
Browse files Browse the repository at this point in the history
…ry fixture
  • Loading branch information
jwlodek committed Sep 19, 2024
1 parent b7acf91 commit aa98607
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 27 deletions.
10 changes: 1 addition & 9 deletions tests/epics/adaravis/test_aravis.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ async def test_can_read(test_adaravis: adaravis.AravisDetector):
async def test_decribe_describes_writer_dataset(
test_adaravis: adaravis.AravisDetector, one_shot_trigger_info: TriggerInfo
):
set_mock_value(test_adaravis._writer.hdf.file_path_exists, True)
set_mock_value(test_adaravis._writer.hdf.capture, True)

assert await test_adaravis.describe() == {}
await test_adaravis.stage()
await test_adaravis.prepare(one_shot_trigger_info)
Expand All @@ -106,10 +103,7 @@ async def test_can_collect(
one_shot_trigger_info: TriggerInfo,
):
path_info = static_path_provider()
full_file_name = path_info.directory_path / "foo.h5"
set_mock_value(test_adaravis.hdf.full_file_name, str(full_file_name))
set_mock_value(test_adaravis._writer.hdf.file_path_exists, True)
set_mock_value(test_adaravis._writer.hdf.capture, True)
full_file_name = path_info.directory_path / f"{path_info.filename}.h5"
await test_adaravis.stage()
await test_adaravis.prepare(one_shot_trigger_info)
docs = [(name, doc) async for name, doc in test_adaravis.collect_asset_docs(1)]
Expand All @@ -135,8 +129,6 @@ async def test_can_collect(
async def test_can_decribe_collect(
test_adaravis: adaravis.AravisDetector, one_shot_trigger_info: TriggerInfo
):
set_mock_value(test_adaravis._writer.hdf.file_path_exists, True)
set_mock_value(test_adaravis._writer.hdf.capture, True)
assert (await test_adaravis.describe_collect()) == {}
await test_adaravis.stage()
await test_adaravis.prepare(one_shot_trigger_info)
Expand Down
11 changes: 2 additions & 9 deletions tests/epics/adkinetix/test_kinetix.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ async def test_can_read(test_adkinetix: adkinetix.KinetixDetector):
async def test_decribe_describes_writer_dataset(
test_adkinetix: adkinetix.KinetixDetector, one_shot_trigger_info: TriggerInfo
):
set_mock_value(test_adkinetix._writer.hdf.file_path_exists, True)
set_mock_value(test_adkinetix._writer.hdf.capture, True)

assert await test_adkinetix.describe() == {}
await test_adkinetix.stage()
await test_adkinetix.prepare(one_shot_trigger_info)
Expand All @@ -85,10 +82,8 @@ async def test_can_collect(
one_shot_trigger_info: TriggerInfo,
):
path_info = static_path_provider()
full_file_name = path_info.directory_path / "foo.h5"
set_mock_value(test_adkinetix.hdf.full_file_name, str(full_file_name))
set_mock_value(test_adkinetix._writer.hdf.file_path_exists, True)
set_mock_value(test_adkinetix._writer.hdf.capture, True)
full_file_name = path_info.directory_path / f"{path_info.filename}.h5"

await test_adkinetix.stage()
await test_adkinetix.prepare(one_shot_trigger_info)
docs = [(name, doc) async for name, doc in test_adkinetix.collect_asset_docs(1)]
Expand All @@ -114,8 +109,6 @@ async def test_can_collect(
async def test_can_decribe_collect(
test_adkinetix: adkinetix.KinetixDetector, one_shot_trigger_info: TriggerInfo
):
set_mock_value(test_adkinetix._writer.hdf.file_path_exists, True)
set_mock_value(test_adkinetix._writer.hdf.capture, True)
assert (await test_adkinetix.describe_collect()) == {}
await test_adkinetix.stage()
await test_adkinetix.prepare(one_shot_trigger_info)
Expand Down
11 changes: 2 additions & 9 deletions tests/epics/advimba/test_vimba.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ async def test_can_read(test_advimba: advimba.VimbaDetector):
async def test_decribe_describes_writer_dataset(
test_advimba: advimba.VimbaDetector, one_shot_trigger_info: TriggerInfo
):
set_mock_value(test_advimba._writer.hdf.file_path_exists, True)
set_mock_value(test_advimba._writer.hdf.capture, True)

assert await test_advimba.describe() == {}
await test_advimba.stage()
await test_advimba.prepare(one_shot_trigger_info)
Expand All @@ -99,10 +96,8 @@ async def test_can_collect(
one_shot_trigger_info: TriggerInfo,
):
path_info = static_path_provider()
full_file_name = path_info.directory_path / "foo.h5"
set_mock_value(test_advimba.hdf.full_file_name, str(full_file_name))
set_mock_value(test_advimba._writer.hdf.file_path_exists, True)
set_mock_value(test_advimba._writer.hdf.capture, True)
full_file_name = path_info.directory_path / f"{path_info.filename}.h5"

await test_advimba.stage()
await test_advimba.prepare(one_shot_trigger_info)
docs = [(name, doc) async for name, doc in test_advimba.collect_asset_docs(1)]
Expand All @@ -128,8 +123,6 @@ async def test_can_collect(
async def test_can_decribe_collect(
test_advimba: advimba.VimbaDetector, one_shot_trigger_info: TriggerInfo
):
set_mock_value(test_advimba._writer.hdf.file_path_exists, True)
set_mock_value(test_advimba._writer.hdf.capture, True)
assert (await test_advimba.describe_collect()) == {}
await test_advimba.stage()
await test_advimba.prepare(one_shot_trigger_info)
Expand Down

0 comments on commit aa98607

Please sign in to comment.