-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
""" | ||
Test the area detector factory class with an ophyd fake device. | ||
.. see: https://github.com/BCDA-APS/apstools/issues/984#issuecomment-2195201893 | ||
""" | ||
from ophyd.sim import instantiate_fake_device as make_fake | ||
|
||
from ..area_detector_factory import ad_class_factory | ||
|
||
|
||
def test_my_fake_area_detector(): | ||
ad_class = ad_class_factory("FakeAD", None, ["cam"]) | ||
fake_ad = make_fake(ad_class, prefix="Fake:AD", name="fake_ad") | ||
assert "cam.acquire_time" not in fake_ad.stage_sigs | ||
|
||
fake_ad.stage_sigs["cam.acquire_time"] = 2.0 | ||
fake_ad.stage() | ||
assert fake_ad.cam.acquire_time.get() == 2.0 |