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

Method test

test/IECore/ReprTest.py:42–62  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

40class ReprTest( unittest.TestCase ) :
41
42 def test( self ) :
43
44 for v in [
45 imath.V2i( 1 ),
46 imath.V2f( 1 ),
47 imath.V2d( 1.5 ),
48 imath.V3i( 1 ),
49 imath.V3f( 1 ),
50 imath.V3d( 1.5 ),
51 imath.Box2i(),
52 imath.Box2i( imath.V2i( 1 ), imath.V2i( 1 ) ),
53 imath.Box2f( imath.V2f( -1 ), imath.V2f( 1 ) ),
54 imath.Box2f(),
55 imath.Box3f( imath.V3f( -1 ), imath.V3f( 1 ) ),
56 imath.Box3f(),
57 "test",
58 10,
59 10.5
60 ] :
61 self.assertTrue( type( v ) is type( eval( IECore.repr( v ) ) ) )
62 self.assertEqual( v, eval( IECore.repr( v ) ) )
63
64 def testInfinity( self ) :
65

Callers

nothing calls this directly

Calls 2

typeFunction · 0.85
reprMethod · 0.80

Tested by

no test coverage detected