=================================== FAILURES ===================================
______________________________ test_lima_image_1 _______________________________
beacon = <bliss.config.static.Config object at 0x7ff58bd5d710>
default_session = <bliss.common.session.DefaultSession object at 0x7ff58a3e2650>
lima_simulator = ('tango://localhost:43994/id00/limaccds/simulator1', DeviceProxy(tango://localhost:43994/id00/limaccds/simulator1,140693022978608))
images_directory = '/tmp/pytest-of-root/pytest-0/images'
def test_lima_image_1(beacon, default_session, lima_simulator, images_directory):
""" Perform a serie of tests using a Bliss Lima detector in different geometries.
The value of the sum of a given roi on the lima image is checked for different combination
of {binning, flipping, rotation}.
The way the image_array (corresponding to the roi) is obtained is defined by the 'data_mode' in [0, 1, 2] (see 'get_image_array').
The order of the commands sent to the proxy (for bin, flip, rot) is fixed and defined in bliss.lima_base.apply_parameters ('bfr').
with _DEBUG == 0 => No prints, No Image Display, exit at first wrong sum
with _DEBUG == 1 => Tabulated prints, No Image Display
with _DEBUG == 2 => Tabulated prints, Image Display
"""
_DEBUG = 0
if _DEBUG > 1:
# ---Activate a live display for debug
disp = get_image_display()
else:
disp = None
# --- Define test params
expo = 0.001
roi1 = [160, 60, 120, 200]
binvals = [[1, 1], [2, 2], [4, 4]] # , [4, 4]] [1, 2], , [2, 1]
rotvals = [0, 90, 180, 270]
flipvals = [
[False, False],
[True, True],
[True, False],
[False, True],
] # [True, False], [False, True]
data_modes = [0] # 1, 2, 3
push_modes = ["bfr"] # 'bfr','frb','rbf'
_BPP2DTYPE = {
"Bpp8": "uint8",
"Bpp8S": "int8",
"Bpp10": "uint16",
"Bpp10S": "int16",
"Bpp12": "uint16",
"Bpp12S": "int16",
"Bpp14": "uint16",
"Bpp14S": "int16",
"Bpp16": "uint16",
"Bpp16S": "int16",
"Bpp32": "uint32",
"Bpp32S": "int32",
"Bpp32F": "float32",
}
last_params = {"bin": None, "flip": None, "rot": None, "roi": None}
# ---Load camera and test image 'chart_2.edf' (600,600) with bg @ 255
# => roi = [160, 60, 120, 200] ( <=> rect=[160, 60, 280, 260] <=> roi around 'UP_ARROW' => asum = 21843)
cam = beacon.get("lima_simulator")
img_path = os.path.join(str(images_directory), "chart_2.edf")
load_simulator_frames(cam, 1, img_path)
def push_params(bin, flip, rot, push_mode="bfr", cache=False):
try:
if push_mode == "bfr":
if cache:
if bin != last_params["bin"]:
cam.image.binning = bin
last_params["bin"] = bin
if flip != last_params["flip"]:
cam.image.flip = flip
last_params["flip"] = flip
if rot != last_params["rot"]:
cam.image.rotation = rot
last_params["rot"] = rot
else:
cam.image.binning = bin
cam.image.flip = flip
cam.image.rotation = rot
elif push_mode == "frb":
if cache:
if flip != last_params["flip"]:
cam.image.flip = flip
last_params["flip"] = flip
if rot != last_params["rot"]:
cam.image.rotation = rot
last_params["rot"] = rot
if bin != last_params["bin"]:
cam.image.binning = bin
last_params["bin"] = bin
else:
cam.image.flip = flip
cam.image.rotation = rot
cam.image.binning = bin
elif push_mode == "rbf":
if cache:
if rot != last_params["rot"]:
cam.image.rotation = rot
last_params["rot"] = rot
if bin != last_params["bin"]:
cam.image.binning = bin
last_params["bin"] = bin
if flip != last_params["flip"]:
cam.image.flip = flip
last_params["flip"] = flip
else:
cam.image.rotation = rot
cam.image.binning = bin
cam.image.flip = flip
except Exception as e:
if _DEBUG > 0:
print(
f"Error in PushParams: bin={bin}, flip={flip}, rot={rot}, push_mode={push_mode} "
)
raise e
def get_image_sizes():
_bpp = str(cam.proxy.image_type)
_sizes = cam.proxy.image_sizes
_shape = int(_sizes[3]), int(_sizes[2])
_depth = int(_sizes[1])
_sign = int(_sizes[0])
_dtype = _BPP2DTYPE[_bpp]
_dlen = _shape[0] * _shape[1] * _depth
return _dlen, _dtype, _shape
def get_image_array(data_mode=0, scan=None):
if data_mode == 0:
return get_last_image(cam)
elif data_mode == 1:
data_type, data = cam.proxy.last_image
if data_type == "DATA_ARRAY":
_dlen, _dtype, _shape = get_image_sizes()
return numpy.frombuffer(data[-_dlen:], dtype=_dtype).reshape(_shape)
else:
raise TypeError(f"cannot handle data-type {data_type}")
elif data_mode == 2:
return image_from_server(cam.proxy, -1)
elif data_mode == 3:
return scan.get_data("image").as_array()
def check(binning, flip, rotation, data_mode, push_mode):
push_params(binning, flip, rotation, push_mode, cache=False)
s = ct(expo, cam)
img = get_image_array(data_mode, s)
if disp:
disp.show(img)
if _DEBUG == 0:
assert numpy.sum(img) == asum
else:
if numpy.sum(img) == asum:
res = "PASSED"
else:
res = "FAILED"
# broi = cam.image.roi
# proi = list(cam.proxy.image_roi)
line = [
counts,
binning,
[int(i) for i in flip],
rotation,
data_mode,
push_mode,
res,
# broi,
# proi,
]
line = tab.add_line(line)
print(line)
# ---Prepare camera
push_params([1, 1], [False, False], 0, push_mode="bfr")
cam.image.roi = roi1
cam.proxy.image_roi = roi1
s = ct(expo, cam)
assert list(cam.proxy.image_bin) == [1, 1]
assert list(cam.proxy.image_flip) == [False, False]
assert cam.proxy.image_rotation == "NONE"
assert list(cam.proxy.image_roi) == roi1
# ---Get the sum of the roi
for mode in range(4):
a = get_image_array(mode, s)
asum = numpy.sum(a)
assert asum == 21843
# ---Apply the different combinations and permutations of (bin, flip, rot)
counts = 0
if _DEBUG > 0:
labels = [
"geoid",
"binning",
"flipping",
"rotation",
"data_mode",
"push_mode",
"result",
# " bliss roi ",
# " proxy roi ",
]
tab = IncrementalTable([labels], col_sep="|")
tab.resize(minwidth=10, maxwidth=30)
tab.add_separator(sep="-", line_index=1)
tab.set_column_params(0, {"push_mode": "", "dtype": "d"})
tab.set_column_params(3, {"push_mode": "", "dtype": "d"})
tab.set_column_params(4, {"push_mode": "", "dtype": "d"})
print(f"\n{tab}")
for binning in binvals:
for flip in flipvals:
for rotation in rotvals:
for data_mode in data_modes:
for push_mode in push_modes:
> check(binning, flip, rotation, data_mode, push_mode)
tests/controllers_sw/test_lima_image.py:516:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/controllers_sw/test_lima_image.py:437: in check
s = ct(expo, cam)
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/utils.py:958: in wrapped_function
)(function)(*args, **kwargs)
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/utils.py:904: in wrapped_function
return function(*args, **kwargs)
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/utils.py:869: in wrapped_function
return function(*args, **kwargs)
/opt/conda/envs/testenv/lib/python3.7/site-packages/typeguard/__init__.py:1015: in wrapper
retval = func(*args, **kwargs)
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/scans/ct.py:96: in ct
s.run()
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/scan.py:1629: in run
self._execute_scan_runner(runner)
/opt/conda/envs/testenv/lib/python3.7/contextlib.py:524: in __exit__
raise exc_details[1]
/opt/conda/envs/testenv/lib/python3.7/contextlib.py:509: in __exit__
if cb(*exc_details):
/opt/conda/envs/testenv/lib/python3.7/contextlib.py:377: in _exit_wrapper
return cm_exit(cm, exc_type, exc, tb)
/opt/conda/envs/testenv/lib/python3.7/contextlib.py:119: in __exit__
next(self.gen)
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/cleanup.py:291: in capture_exceptions
raise value
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/cleanup.py:267: in capture
yield
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/scan.py:1674: in wrapper
yield
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/scan.py:1629: in run
self._execute_scan_runner(runner)
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/scan.py:1638: in _execute_scan_runner
runner.send([gevent.spawn(i.apply_parameters) for i in scan_chain_iterators])
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/scan.py:515: in send
return self.runner.send(arg)
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/scan.py:527: in _run
self._gwait(apply_parameters_tasks)
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/scan.py:492: in _gwait
gevent.joinall(greenlets, raise_error=True)
src/gevent/greenlet.py:1057: in gevent._gevent_cgreenlet.joinall
???
src/gevent/greenlet.py:1073: in gevent._gevent_cgreenlet.joinall
???
src/gevent/greenlet.py:371: in gevent._gevent_cgreenlet.Greenlet._raise_exception
???
/opt/conda/envs/testenv/lib/python3.7/site-packages/gevent/_compat.py:65: in reraise
raise value.with_traceback(tb)
src/gevent/greenlet.py:906: in gevent._gevent_cgreenlet.Greenlet.run
???
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/chain.py:825: in apply_parameters
gevent.joinall(tasks, raise_error=True)
src/gevent/greenlet.py:1057: in gevent._gevent_cgreenlet.joinall
???
src/gevent/greenlet.py:1073: in gevent._gevent_cgreenlet.joinall
???
src/gevent/greenlet.py:371: in gevent._gevent_cgreenlet.Greenlet._raise_exception
???
/opt/conda/envs/testenv/lib/python3.7/site-packages/gevent/_compat.py:65: in reraise
raise value.with_traceback(tb)
src/gevent/greenlet.py:906: in gevent._gevent_cgreenlet.Greenlet.run
???
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/chain.py:464: in apply_parameters
self.device.apply_parameters(self._ctrl_params)
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/controllers/lima/lima_base.py:495: in apply_parameters
setattr(self.proxy, key, value)
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/tango.py:212: in __setattr__
super().__setattr__(name, value)
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/proxy.py:195: in __setattr__
setattr(self.__wrapped__, name, value)
/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/device_proxy.py:330: in __DeviceProxy__setattr
return __set_attribute_value(self, name, value)
/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/device_proxy.py:271: in __set_attribute_value
return self.write_attribute(name, value)
/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/green.py:195: in greener
return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/green.py:114: in run
return self.access(accessor, timeout=timeout)
/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/gevent_executor.py:155: in access
return accessor.get(timeout=timeout)
src/gevent/event.py:329: in gevent._gevent_cevent.AsyncResult.get
???
src/gevent/event.py:359: in gevent._gevent_cevent.AsyncResult.get
???
src/gevent/event.py:347: in gevent._gevent_cevent.AsyncResult.get
???
src/gevent/event.py:327: in gevent._gevent_cevent.AsyncResult._raise_exception
???
/opt/conda/envs/testenv/lib/python3.7/site-packages/gevent/_compat.py:65: in reraise
raise value.with_traceback(tb)
/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/gevent_executor.py:68: in wrapper
return func(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> return self._write_attribute(*args, **kwargs)
E PyTango.DevFailed: DevFailed[
E DevError[
E desc = limacore.Exception: Common: checkCorner(/opt/conda/conda-bld/lima-core_1634654326890/work/common/include/lima/SizeUtils.h, 590): InvalidValue: Invalid corner coords
E
E origin = Traceback (most recent call last):
E File "/opt/conda/envs/testenv/lib/python3.7/site-packages/Lima/Core/Debug.py", line 64, in real_fn
E return new_fn(*arg, **kw)
E File "/opt/conda/envs/testenv/lib/python3.7/site-packages/Lima/Server/LimaCCDs.py", line 1080, in write_image_bin
E image.setBin(binValue)
E limacore.Exception: Common: checkCorner(/opt/conda/conda-bld/lima-core_1634654326890/work/common/include/lima/SizeUtils.h, 590): InvalidValue: Invalid corner coords
E
E reason = PyDs_PythonError
E severity = ERR]
E
E DevError[
E desc = Failed to write_attribute on device id00/limaccds/simulator1, attribute image_bin
E origin = DeviceProxy::write_attribute()
E reason = API_AttributeFailed
E severity = ERR]
E ]
/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/device_proxy.py:1494: DevFailed
---------------------------- Captured stdout setup -----------------------------
[2021/12/20 10:13:00.918080] 7f344af89740 *Application*Lima.Server.LimaCCDs::LimaCCDs::apply_config-Always: Applied config : /root/lima_simulator.cfg : default
---------------------------- Captured stderr setup -----------------------------
Unknown exception while trying to fill database cache...
----------------------------- Captured stdout call -----------------------------
[2021/12/20 10:13:01.449512] 7f33bffff700 *Application*Lima.Server.LimaCCDs::LimaCCDs::read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
[2021/12/20 10:13:01.528518] 7f33bffff700 *Application*Lima.Server.LimaCCDs::LimaCCDs::read_acc_saturated_cblevel-Error: Accumulation threshold plugins not loaded
----------------------------- Captured stderr call -----------------------------
********* Exception(InvalidValue): Invalid corner coords *********
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/chain.py", line 464, in apply_parameters
self.device.apply_parameters(self._ctrl_params)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/controllers/lima/lima_base.py", line 495, in apply_parameters
setattr(self.proxy, key, value)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/tango.py", line 212, in __setattr__
super().__setattr__(name, value)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/proxy.py", line 195, in __setattr__
setattr(self.__wrapped__, name, value)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/device_proxy.py", line 330, in __DeviceProxy__setattr
return __set_attribute_value(self, name, value)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/device_proxy.py", line 271, in __set_attribute_value
return self.write_attribute(name, value)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/green.py", line 195, in greener
return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/green.py", line 114, in run
return self.access(accessor, timeout=timeout)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/gevent_executor.py", line 155, in access
return accessor.get(timeout=timeout)
File "src/gevent/event.py", line 329, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 359, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 347, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 327, in gevent._gevent_cevent.AsyncResult._raise_exception
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/gevent/_compat.py", line 65, in reraise
raise value.with_traceback(tb)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/gevent_executor.py", line 68, in wrapper
return func(*args, **kwargs)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/device_proxy.py", line 1494, in __DeviceProxy__write_attribute
return self._write_attribute(*args, **kwargs)
PyTango.DevFailed: DevFailed[
DevError[
desc = limacore.Exception: Common: checkCorner(/opt/conda/conda-bld/lima-core_1634654326890/work/common/include/lima/SizeUtils.h, 590): InvalidValue: Invalid corner coords
origin = Traceback (most recent call last):
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/Lima/Core/Debug.py", line 64, in real_fn
return new_fn(*arg, **kw)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/Lima/Server/LimaCCDs.py", line 1080, in write_image_bin
image.setBin(binValue)
limacore.Exception: Common: checkCorner(/opt/conda/conda-bld/lima-core_1634654326890/work/common/include/lima/SizeUtils.h, 590): InvalidValue: Invalid corner coords
reason = PyDs_PythonError
severity = ERR]
DevError[
desc = Failed to write_attribute on device id00/limaccds/simulator1, attribute image_bin
origin = DeviceProxy::write_attribute()
reason = API_AttributeFailed
severity = ERR]
]
2021-12-20T10:13:07Z <BlissGreenlet at 0x7ff5a572aa70: <bound method AcquisitionObject.apply_parameters of <bliss.scanning.acquisition.lima.LimaAcquisitionMaster object at 0x7ff5a53d9a10>>> failed with DevFailed
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/chain.py", line 825, in apply_parameters
gevent.joinall(tasks, raise_error=True)
File "src/gevent/greenlet.py", line 1057, in gevent._gevent_cgreenlet.joinall
File "src/gevent/greenlet.py", line 1073, in gevent._gevent_cgreenlet.joinall
File "src/gevent/greenlet.py", line 371, in gevent._gevent_cgreenlet.Greenlet._raise_exception
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/gevent/_compat.py", line 65, in reraise
raise value.with_traceback(tb)
File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/chain.py", line 464, in apply_parameters
self.device.apply_parameters(self._ctrl_params)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/controllers/lima/lima_base.py", line 495, in apply_parameters
setattr(self.proxy, key, value)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/tango.py", line 212, in __setattr__
super().__setattr__(name, value)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/common/proxy.py", line 195, in __setattr__
setattr(self.__wrapped__, name, value)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/device_proxy.py", line 330, in __DeviceProxy__setattr
return __set_attribute_value(self, name, value)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/device_proxy.py", line 271, in __set_attribute_value
return self.write_attribute(name, value)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/green.py", line 195, in greener
return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/green.py", line 114, in run
return self.access(accessor, timeout=timeout)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/gevent_executor.py", line 155, in access
return accessor.get(timeout=timeout)
File "src/gevent/event.py", line 329, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 359, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 347, in gevent._gevent_cevent.AsyncResult.get
File "src/gevent/event.py", line 327, in gevent._gevent_cevent.AsyncResult._raise_exception
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/gevent/_compat.py", line 65, in reraise
raise value.with_traceback(tb)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/gevent_executor.py", line 68, in wrapper
return func(*args, **kwargs)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/device_proxy.py", line 1494, in __DeviceProxy__write_attribute
return self._write_attribute(*args, **kwargs)
PyTango.DevFailed: DevFailed[
DevError[
desc = limacore.Exception: Common: checkCorner(/opt/conda/conda-bld/lima-core_1634654326890/work/common/include/lima/SizeUtils.h, 590): InvalidValue: Invalid corner coords
origin = Traceback (most recent call last):
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/Lima/Core/Debug.py", line 64, in real_fn
return new_fn(*arg, **kw)
File "/opt/conda/envs/testenv/lib/python3.7/site-packages/Lima/Server/LimaCCDs.py", line 1080, in write_image_bin
image.setBin(binValue)
limacore.Exception: Common: checkCorner(/opt/conda/conda-bld/lima-core_1634654326890/work/common/include/lima/SizeUtils.h, 590): InvalidValue: Invalid corner coords
reason = PyDs_PythonError
severity = ERR]
DevError[
desc = Failed to write_attribute on device id00/limaccds/simulator1, attribute image_bin
origin = DeviceProxy::write_attribute()
reason = API_AttributeFailed
severity = ERR]
]
2021-12-20T10:13:07Z <BlissGreenlet at 0x7ff5a572add0: <bound method AcquisitionChainIter.apply_parameters of <bliss.scanning.chain.AcquisitionChainIter object at 0x7ff58af90210>>> failed with DevFailed
___________________________ test_simulation_shutter ____________________________
beacon = <bliss.config.static.Config object at 0x7ff5a53eb850>
simulation_shutter = <tests.controllers_sw.sim_shutter_test.SimulationShutter object at 0x7ff59d205350>
simulation_shutter_in_another_process = (<Popen at 0x7ff5a512e290 pid=15964 returncode=None>, <Client at 0x7ff58a031050 wrapping <__main__.SimulationShutter object at 0x7faf2193de90> at 0x7ff58abaa4d0 with factory <function Client.__init__.<locals>.<lambda> at 0x7ff59c1a2b90>>)
def test_simulation_shutter(
beacon, simulation_shutter, simulation_shutter_in_another_process
):
_, external_simulation_shutter = simulation_shutter_in_another_process
assert external_simulation_shutter.state_string == simulation_shutter.state_string
assert simulation_shutter.state_string == "Closed"
simulation_shutter.open()
assert simulation_shutter.state_string == "Open"
with gevent.Timeout(3):
while simulation_shutter.is_closed:
# let some time for channel propagation to the external process
gevent.sleep(0.02)
> assert external_simulation_shutter.state_string == simulation_shutter.state_string
E AssertionError: assert 'Closed' == 'Open'
E - Open
E + Closed
tests/controllers_sw/test_shutter.py:67: AssertionError
=============================== warnings summary ===============================
../../../opt/conda/envs/testenv/lib/python3.7/site-packages/tango/utils.py:181
/opt/conda/envs/testenv/lib/python3.7/site-packages/tango/utils.py:181: DeprecationWarning: `np.str` is a deprecated alias for the builtin `str`. To silence this warning, use `str` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.str_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
CmdArgType.DevString: numpy.str,
tests/test_counters.py::test_tango_attr_counter
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/acquisition/counter.py:424: RuntimeWarning: All-NaN axis encountered
Min = numpy.nanmin((Min, newValue))
tests/test_counters.py::test_tango_attr_counter
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/scanning/acquisition/counter.py:425: RuntimeWarning: All-NaN axis encountered
Max = numpy.nanmax((Max, newValue))
tests/controllers_sw/test_monochromator.py::test_bragg2energy
tests/controllers_sw/test_monochromator.py::test_mono_xtals
tests/controllers_sw/test_monochromator.py::test_mono_tracking_parameters
tests/controllers_sw/test_monochromator.py::test_mono_tracking_onoff
tests/controllers_sw/test_monochromator.py::test_mono_tracking_move
/opt/conda/envs/testenv/lib/python3.7/site-packages/pint/quantity.py:1309: RuntimeWarning: divide by zero encountered in double_scalars
magnitude = magnitude_op(new_self._magnitude, other._magnitude)
tests/controllers_sw/test_monochromator.py::test_bragg2energy
tests/controllers_sw/test_monochromator.py::test_mono_xtals
tests/controllers_sw/test_monochromator.py::test_mono_tracking_parameters
tests/controllers_sw/test_monochromator.py::test_mono_tracking_onoff
tests/controllers_sw/test_monochromator.py::test_mono_tracking_move
/opt/conda/envs/testenv/lib/python3.7/site-packages/bliss/controllers/monochromator/energy_tracker.py:388: RuntimeWarning: invalid value encountered in double_scalars
+ self.parameters[axis_name][traj]["E0"]
-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED tests/controllers_sw/test_lima_image.py::test_lima_image_1 - PyTango.D...
FAILED tests/controllers_sw/test_shutter.py::test_simulation_shutter - Assert...