1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
From 54faeab3e2e544111098e0a70270927b465cafbd Mon Sep 17 00:00:00 2001
From: matveyev <yury.matveev@desy.de>
Date: Wed, 4 Dec 2024 12:24:01 +0100
Subject: [PATCH] test_utils.py: assert_close more tolerant for booleans
Bug: https://gitlab.com/tango-controls/pytango/-/issues/645
Origin: upstream, https://gitlab.com/tango-controls/pytango/-/merge_requests/769
---
tango/test_utils.py | 3 +++
1 file changed, 3 insertions(+)
Index: pytango/tango/test_utils.py
===================================================================
--- pytango.orig/tango/test_utils.py
+++ pytango/tango/test_utils.py
@@ -499,6 +499,9 @@ if pytest:
elif isinstance(a, (np.bool_, bool)) or isinstance(b, (np.bool_, bool)):
assert a == b
return
+ elif isinstance(a, (np.bool_, bool)) or isinstance(b, (np.bool_, bool)):
+ assert a == b
+ return
try:
assert a == pytest.approx(b)
except (ValueError, TypeError):
|