MCPcopy Create free account
hub / github.com/Kitware/VTK / testComparisonMethods

Method testComparisonMethods

Common/Core/Testing/Python/TestVariant.py:144–152  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

142 self.assertEqual(l, s)
143
144 def testComparisonMethods(self):
145 v1 = vtkVariant(10)
146 v2 = vtkVariant("10")
147 # compare without regards to type
148 self.assertEqual(vtkVariantEqual(v1, v2), True)
149 self.assertEqual(vtkVariantLessThan(v1, v2), False)
150 # compare with different types being non-equivalent
151 self.assertEqual(vtkVariantStrictEquality(v1, v2), False)
152 self.assertEqual(vtkVariantStrictWeakOrder(v1, v2), True)
153
154 def testStrictWeakOrder(self):
155 """Use vtkVariantStrictWeakOrder to sort a list of vtkVariants"""

Callers

nothing calls this directly

Calls 5

vtkVariantEqualFunction · 0.90
vtkVariantLessThanClass · 0.90
vtkVariantStrictEqualityFunction · 0.90
vtkVariantClass · 0.50

Tested by

no test coverage detected