Skip to content

Commit

Permalink
KCore: bool support in test
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit128 committed Jul 12, 2024
1 parent d45fe0a commit 6763a3a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cassiopee/Apps/test/IBMOutletControlPressure_t1.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import Connector.IBM as X_IBM
import os

test.TOLERANCE = 1.e-6
test.TOLERANCE = 3.e-6

LOCAL = test.getLocal()
FastC.MX_SYNCHRO= 1761
Expand Down
6 changes: 5 additions & 1 deletion Cassiopee/KCore/KCore/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,11 @@ def checkObject_(objet, refObjet, reference):
print("DIFF: object type differs from "+reference+'.')
return False
# autres tests
if isinstance(refObjet, (int, numpy.int32, numpy.int64)):
if isinstance(refObjet, bool):
if refObjet != objet:
print("DIFF: object value differs from %s (diff=%g,%g)."%(reference, objet, refObjet))
return False
elif isinstance(refObjet, (int, numpy.int32, numpy.int64)):
diff = abs(refObjet-objet)
if diff > 0:
print("DIFF: object value differs from %s (diff=%g)."%(reference, diff))
Expand Down

0 comments on commit 6763a3a

Please sign in to comment.