MCPcopy Create free account
hub / github.com/ImageEngine/cortex / testConstructors

Method testConstructors

test/IECore/Imath.py:494–505  ·  view source on GitHub ↗

Test Box3f constructors

(self)

Source from the content-addressed store, hash-verified

492
493class ImathBox3f(unittest.TestCase):
494 def testConstructors(self):
495 """Test Box3f constructors"""
496 b = imath.Box3f()
497 self.assertTrue( b.isEmpty() )
498
499 b = imath.Box3f( imath.V3f(1.0, 1.0, 1.0) )
500 self.assertEqual( b.min(), imath.V3f(1.0, 1.0, 1.0) )
501 self.assertEqual( b.max(), imath.V3f(1.0, 1.0, 1.0) )
502
503 b = imath.Box3f( imath.V3f(-1.0, -1.0, -1.0), imath.V3f(1.0, 1.0, 1.0) )
504 self.assertEqual( b.min(), imath.V3f(-1.0, -1.0, -1.0) )
505 self.assertEqual( b.max(), imath.V3f( 1.0, 1.0, 1.0) )
506
507 def testEquality(self):
508 """Test Box3f comparison for equality"""

Callers

nothing calls this directly

Calls 3

minMethod · 0.80
maxMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected