Skip to content

Commit

Permalink
Fix bug in BeamMockup and test_beam
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonia Beteva committed Aug 28, 2024
1 parent 8df43cd commit 7838ce2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mxcubecore/HardwareObjects/mockup/BeamMockup.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,9 @@ def set_value(self, size=None):
if self._definer_type in (self.aperture, "aperture"):
if not isinstance(size, str):
raise TypeError("Incorrect input value for aperture")
self.aperture.set_value(size)
self.aperture.set_value(self.aperture.VALUES[size], timeout=2)

if self._definer_type in (self.definer, "definer"):
if not isinstance(size, str):
raise TypeError("Incorrect input value for definer")
self.definer.set_value(size)
self.definer.set_value(self.definer.VALUES[size], timeout=2)
4 changes: 2 additions & 2 deletions test/pytest/test_beam.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def test_set_aperture_diameters(self, test_object):

for aperture_diameter in test_object.aperture.get_diameter_size_list():
_val = test_object.aperture.VALUES[aperture_diameter]
test_object.aperture.set_value(_val, timeout=2)
test_object.set_value(aperture_diameter)

beam_width, beam_height, beam_shape, beam_label = test_object.get_value()
# get_value returns size in mm, aperture diameters are in microns
Expand Down Expand Up @@ -243,7 +243,7 @@ def test_set_definer_size(self, test_object):

for dsize in test_object.definer.VALUES:
if dsize.name != "UNKNOWN":
test_object.definer.set_value(dsize, timeout=2)
test_object.set_value(dsize.name)

(
beam_width,
Expand Down

0 comments on commit 7838ce2

Please sign in to comment.