| 40 | class 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 | |