Skip to content

Commit

Permalink
Update due to failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
barbalt committed Sep 18, 2024
1 parent 591c0c6 commit cc7559a
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions test/lib/mayaUsd/fileio/testExportChaserJobContext.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def PostExport(self):
ChaserExample2.postExportCalled = True

# creating an extra prim to be tested on Duplicate As
scope = Usd.Prim = self.stage.DefinePrim("/TestScope", "Scope")
scope = self.stage.DefinePrim("/TestScope", "Scope")
self.RegisterExtraPrimsPaths([scope.GetPath()])

return True
Expand Down Expand Up @@ -210,6 +210,11 @@ def setUpClass(cls):
fixturesUtils.setUpClass(__file__)
cls.temp_dir = os.path.abspath('.')

ChaserExample1.register()
ChaserExample2.register()
JobContextExample1.register()
JobContextExample2.register()

@classmethod
def tearDownClass(cls):
standalone.uninitialize()
Expand All @@ -218,11 +223,6 @@ def setUp(self):
cmds.file(new=True, force=True)

def testSimpleExportChaser(self):
ChaserExample1.register()
ChaserExample2.register()
JobContextExample1.register()
JobContextExample2.register()

cmds.polySphere(r = 3.5, name='apple')

usdFilePath = os.path.join(self.temp_dir,'testExportChaser.usda')
Expand Down Expand Up @@ -250,7 +250,7 @@ def testSimpleExportChaser(self):
self.assertTrue(ChaserExample2.postExportCalled)

def testChaserWithDuplicateAsUsd(self):
sphere = cmds.polySphere(r = 1, name='apple')
sphere = cmds.polySphere(r = 1, name='TestSphere')

# Create a stage to receive the USD duplicate.
psPathStr = mayaUsd_createStageWithNewLayer.createStageWithNewLayer()
Expand All @@ -260,12 +260,11 @@ def testChaserWithDuplicateAsUsd(self):

# check if the extra prim has also been duplicated
stage = mayaUsd.lib.GetPrim(psPathStr).GetStage()
applePrim = stage.GetPrimAtPath("/apple")
spherePrim = stage.GetPrimAtPath("/TestSphere")
scopePrim = stage.GetPrimAtPath("/TestScope")

self.assertTrue(applePrim.IsValid())
self.assertTrue(spherePrim.IsValid())
self.assertTrue(scopePrim.IsValid())


if __name__ == '__main__':
unittest.main(verbosity=2)
unittest.main(verbosity=2)

0 comments on commit cc7559a

Please sign in to comment.