-
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
4 changed files
with
58 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,35 @@ | ||
from ..xia_slit import XiaSlitController | ||
# from ...utils import SlitGeometry | ||
|
||
import pytest | ||
|
||
IOC = "gp:" | ||
|
||
# Full testing requires two XIA Slit controllers (a 2D H & V set) | ||
# We don't have that for unit testing. Proceed with best efforts. | ||
|
||
|
||
def test_XiaSlit(capsys): | ||
slit1 = XiaSlitController("gp:hsc1:", name="slit1") | ||
assert slit1 is not None | ||
|
||
# slit1.wait_for_connection() | ||
assert not slit1.connected | ||
cns = """ | ||
inb out bot top | ||
hsize vsize hcenter vcenter | ||
hID horientation hbusy | ||
vID vorientation vbusy | ||
enable | ||
error_code error_message message1 message2 message3 | ||
calibrate initialize locate stop_button | ||
precision | ||
""".split() | ||
assert slit1.component_names == tuple(cns) | ||
|
||
with pytest.raises(TypeError): | ||
print(slit1.geometry) | ||
|
||
captured = capsys.readouterr() | ||
assert captured.out.split("\n") == [""] | ||
assert captured.err.split("\n") == [""] |
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
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