MCPcopy Create free account
hub / github.com/Kitware/ParaView / equal

Function equal

Clients/ParaView/Testing/Python/TestPythonAnnotationFilter.py:12–26  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

10#-------------------- Comparison helper ----------------------
11
12def equal(a, b):
13 if a == b:
14 return True
15 aList = a.replace(","," ").replace("["," ").replace("]", " ").split(" ")
16 bList = b.replace(","," ").replace("["," ").replace("]", " ").split(" ")
17 size = len(aList)
18 if size != len(bList):
19 return False
20 for i in range(size):
21 if len(aList[i]) > 0:
22 af = float(aList[i])
23 bf = float(bList[i])
24 if ((af-bf)*(af-bf)) > 0.000001:
25 return False
26 return True
27
28#-------------------- Start testing --------------------------
29

Callers 15

SetSlicesMethod · 0.50
SetReferenceBoundsMethod · 0.50
PlaceWidgetMethod · 0.50
SetElementsMethod · 0.50
CopyMethod · 0.50
SetEntriesFunction · 0.50
SetUncheckedElementsMethod · 0.50
SetElementsMethod · 0.50
IsValueDefaultMethod · 0.50

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected