Skip to content

Commit 2e68dc3

Browse files
committed
USD DataAlgoTest : Fix indentation
1 parent 9668070 commit 2e68dc3

File tree

1 file changed

+43
-44
lines changed

1 file changed

+43
-44
lines changed

contrib/IECoreUSD/test/IECoreUSD/DataAlgoTest.py

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -40,65 +40,64 @@
4040

4141
class DataAlgoTest( unittest.TestCase ) :
4242

43-
def testRoleBinding( self ) :
44-
45-
self.assertEqual( IECoreUSD.DataAlgo.role( IECore.GeometricData.Interpretation.Point ), "Point" )
46-
self.assertEqual( IECoreUSD.DataAlgo.role( IECore.GeometricData.Interpretation.Vector ), "Vector" )
47-
self.assertEqual( IECoreUSD.DataAlgo.role( IECore.GeometricData.Interpretation.Normal ), "Normal" )
48-
self.assertEqual( IECoreUSD.DataAlgo.role( IECore.GeometricData.Interpretation.UV ), "TextureCoordinate" )
49-
self.assertEqual( IECoreUSD.DataAlgo.role( IECore.GeometricData.Interpretation.Color ), "Color" )
50-
self.assertEqual( IECoreUSD.DataAlgo.role( IECore.GeometricData.Interpretation.Rational ), "" )
43+
def testRoleBinding( self ) :
5144

52-
def testValueTypeNameBinding( self ) :
45+
self.assertEqual( IECoreUSD.DataAlgo.role( IECore.GeometricData.Interpretation.Point ), "Point" )
46+
self.assertEqual( IECoreUSD.DataAlgo.role( IECore.GeometricData.Interpretation.Vector ), "Vector" )
47+
self.assertEqual( IECoreUSD.DataAlgo.role( IECore.GeometricData.Interpretation.Normal ), "Normal" )
48+
self.assertEqual( IECoreUSD.DataAlgo.role( IECore.GeometricData.Interpretation.UV ), "TextureCoordinate" )
49+
self.assertEqual( IECoreUSD.DataAlgo.role( IECore.GeometricData.Interpretation.Color ), "Color" )
50+
self.assertEqual( IECoreUSD.DataAlgo.role( IECore.GeometricData.Interpretation.Rational ), "" )
5351

54-
v3 = IECore.V3fData( imath.V3f( 0.0 ) )
55-
v2 = IECore.V2fData( imath.V2f( 0.0 ) )
52+
def testValueTypeNameBinding( self ) :
5653

57-
v3.setInterpretation( IECore.GeometricData.Interpretation.Point )
58-
self.assertEqual( IECoreUSD.DataAlgo.valueTypeName( v3 ).type.typeName, "GfVec3f" )
54+
v3 = IECore.V3fData( imath.V3f( 0.0 ) )
55+
v2 = IECore.V2fData( imath.V2f( 0.0 ) )
5956

60-
v3.setInterpretation( IECore.GeometricData.Interpretation.Vector )
61-
self.assertEqual( IECoreUSD.DataAlgo.valueTypeName( v3 ).type.typeName, "GfVec3f" )
57+
v3.setInterpretation( IECore.GeometricData.Interpretation.Point )
58+
self.assertEqual( IECoreUSD.DataAlgo.valueTypeName( v3 ).type.typeName, "GfVec3f" )
6259

63-
v3.setInterpretation( IECore.GeometricData.Interpretation.Normal )
64-
self.assertEqual( IECoreUSD.DataAlgo.valueTypeName( v3 ).type.typeName, "GfVec3f" )
60+
v3.setInterpretation( IECore.GeometricData.Interpretation.Vector )
61+
self.assertEqual( IECoreUSD.DataAlgo.valueTypeName( v3 ).type.typeName, "GfVec3f" )
6562

66-
v2.setInterpretation( IECore.GeometricData.Interpretation.UV )
67-
self.assertEqual( IECoreUSD.DataAlgo.valueTypeName( v2 ).type.typeName, "GfVec2f" )
63+
v3.setInterpretation( IECore.GeometricData.Interpretation.Normal )
64+
self.assertEqual( IECoreUSD.DataAlgo.valueTypeName( v3 ).type.typeName, "GfVec3f" )
6865

69-
self.assertEqual( IECoreUSD.DataAlgo.valueTypeName( IECore.Color3fData( imath.Color3f( 0.0 ) ) ).type.typeName, "GfVec3f" )
66+
v2.setInterpretation( IECore.GeometricData.Interpretation.UV )
67+
self.assertEqual( IECoreUSD.DataAlgo.valueTypeName( v2 ).type.typeName, "GfVec2f" )
7068

71-
def testToFromInternalName( self ) :
69+
self.assertEqual( IECoreUSD.DataAlgo.valueTypeName( IECore.Color3fData( imath.Color3f( 0.0 ) ) ).type.typeName, "GfVec3f" )
7270

73-
a = "a-name(that-is-bad)"
71+
def testToFromInternalName( self ) :
7472

75-
b = IECoreUSD.SceneCacheDataAlgo.toInternalName( a )
76-
self.assertEqual( b, "a_____name____that_____is_____bad___" )
73+
a = "a-name(that-is-bad)"
7774

78-
c = IECoreUSD.SceneCacheDataAlgo.fromInternalName( b )
79-
80-
self.assertEqual( a , c )
75+
b = IECoreUSD.SceneCacheDataAlgo.toInternalName( a )
76+
self.assertEqual( b, "a_____name____that_____is_____bad___" )
8177

82-
def testToFromInternalPath( self ) :
78+
c = IECoreUSD.SceneCacheDataAlgo.fromInternalName( b )
79+
self.assertEqual( a , c )
8380

84-
a = ["a-path", "(that)", "(is)", "(bad)"]
81+
def testToFromInternalPath( self ) :
8582

86-
b = IECoreUSD.SceneCacheDataAlgo.toInternalPath( a )
87-
self.assertEqual(
88-
b,
89-
[
90-
"__IECOREUSD_ROOT",
91-
"a_____path",
92-
"____that___",
93-
"____is___",
94-
"____bad___",
95-
]
96-
)
83+
a = ["a-path", "(that)", "(is)", "(bad)"]
9784

98-
c = IECoreUSD.SceneCacheDataAlgo.fromInternalPath( b )
85+
b = IECoreUSD.SceneCacheDataAlgo.toInternalPath( a )
86+
self.assertEqual(
87+
b,
88+
[
89+
"__IECOREUSD_ROOT",
90+
"a_____path",
91+
"____that___",
92+
"____is___",
93+
"____bad___",
94+
]
95+
)
96+
97+
c = IECoreUSD.SceneCacheDataAlgo.fromInternalPath( b )
98+
99+
self.assertEqual( a, c )
99100

100-
self.assertEqual( a, c )
101-
102101

103102
if __name__ == "__main__":
104-
unittest.main()
103+
unittest.main()

0 commit comments

Comments
 (0)