Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use fixturesUtils for pxrUsdMayaGL tests #779

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeDrawAndTransform(unittest.TestCase):

Expand All @@ -32,8 +34,11 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

inputPath = fixturesUtils.setUpClass(__file__,
initializeStandalone=False, loadPlugin=False)

cls._testName = 'ProxyShapeDrawAndTransformTest'
cls._inputDir = os.path.abspath(cls._testName)
cls._inputDir = os.path.join(inputPath, cls._testName)

cls._testDir = os.path.abspath('.')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeDrawColorAccuracy(unittest.TestCase):

Expand All @@ -30,8 +32,11 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

inputPath = fixturesUtils.setUpClass(__file__,
initializeStandalone=False, loadPlugin=False)

cls._testName = 'ProxyShapeDrawColorAccuracyTest'
cls._inputDir = os.path.abspath(cls._testName)
cls._inputDir = os.path.join(inputPath, cls._testName)

cls._testDir = os.path.abspath('.')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeDrawColors(unittest.TestCase):

Expand All @@ -30,10 +32,11 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

cmds.loadPlugin('mayaUsdPlugin')
inputPath = fixturesUtils.setUpClass(__file__,
initializeStandalone=False)

cls._testName = 'ProxyShapeDrawColorsTest'
cls._inputDir = os.path.abspath(cls._testName)
cls._inputDir = os.path.join(inputPath, cls._testName)

cls._testDir = os.path.abspath('.')

Expand Down
17 changes: 11 additions & 6 deletions test/lib/mayaUsd/render/pxrUsdMayaGL/testProxyShapeDrawLighting.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeDrawLighting(unittest.TestCase):

Expand All @@ -30,18 +32,21 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

inputPath = fixturesUtils.setUpClass(__file__,
initializeStandalone=False, loadPlugin=False)

cls._testDir = os.path.abspath('.')

cls._testRootNodeName = 'ProxyShapeDrawLightingTest'
cls._testSceneName = '%s.ma' % cls._testRootNodeName
cls._testSceneFullPath = os.path.abspath(
os.path.join('ProxyShapeDrawLightingTest', cls._testSceneName))
cls._testName = 'ProxyShapeDrawLightingTest'
cls._testSceneName = '%s.ma' % cls._testName
cls._testSceneFullPath = os.path.join(inputPath, cls._testName,
cls._testSceneName)

cls._nativeNodePathName = '|%s|Native' % cls._testRootNodeName
cls._nativeNodePathName = '|%s|Native' % cls._testName
cls._nativeTorusPathName = '%s|Torus' % cls._nativeNodePathName
cls._nativePlanePathName = '%s|Plane' % cls._nativeNodePathName

cls._hydraNodePathName = '|%s|Hydra' % cls._testRootNodeName
cls._hydraNodePathName = '|%s|Hydra' % cls._testName
cls._hydraTorusPathName = '%s|Torus' % cls._hydraNodePathName
cls._hydraPlanePathName = '%s|Plane' % cls._hydraNodePathName

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeDrawPerformance(unittest.TestCase):

Expand All @@ -35,7 +37,11 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

cls._inputDir = os.path.abspath('ProxyShapeDrawPerformanceTest')
inputPath = fixturesUtils.setUpClass(__file__,
initializeStandalone=False, loadPlugin=False)

cls._inputDir = os.path.join(inputPath,
'ProxyShapeDrawPerformanceTest')

cls._testDir = os.path.abspath('.')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeDrawPurpose(unittest.TestCase):

Expand All @@ -30,6 +32,12 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

inputPath = fixturesUtils.setUpClass(__file__,
initializeStandalone=False, loadPlugin=False)

cls._testName = 'ProxyShapeDrawPurposeTest'
cls._inputDir = os.path.join(inputPath, cls._testName)

cls._testDir = os.path.abspath('.')

cls._cameraName = 'MainCamera'
Expand Down Expand Up @@ -72,11 +80,8 @@ def testDrawAndToggleDrawPurposeAttributes(self):
Tests drawing USD proxy shapes while changing their purpose-based draw
attributes.
"""
self._testName = 'ProxyShapeDrawPurposeTest'

mayaSceneFile = '%s.ma' % self._testName
mayaSceneFullPath = os.path.abspath(
os.path.join('ProxyShapeDrawPurposeTest', mayaSceneFile))
mayaSceneFullPath = os.path.join(self._inputDir, mayaSceneFile)
cmds.file(mayaSceneFullPath, open=True, force=True)

# Force an initial draw to complete by switching frames.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeDrawTimeSampled(unittest.TestCase):

Expand All @@ -30,8 +32,11 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

inputPath = fixturesUtils.setUpClass(__file__,
initializeStandalone=False, loadPlugin=False)

cls._testName = 'ProxyShapeDrawTimeSampledTest'
cls._inputDir = os.path.abspath(cls._testName)
cls._inputDir = os.path.join(inputPath, cls._testName)

cls._testDir = os.path.abspath('.')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeDrawUsdChangeProcessing(unittest.TestCase):

Expand All @@ -32,8 +34,11 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

inputPath = fixturesUtils.setUpClass(__file__,
initializeStandalone=False, loadPlugin=False)

cls._testName = 'ProxyShapeDrawUsdChangeProcessingTest'
cls._inputDir = os.path.abspath(cls._testName)
cls._inputDir = os.path.join(inputPath, cls._testName)

cls._testDir = os.path.abspath('.')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeDrawVisibility(unittest.TestCase):

Expand All @@ -30,8 +32,11 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

inputPath = fixturesUtils.setUpClass(__file__,
initializeStandalone=False, loadPlugin=False)

cls._testName = 'ProxyShapeDrawVisibilityTest'
cls._inputDir = os.path.abspath(cls._testName)
cls._inputDir = os.path.join(inputPath, cls._testName)

cls._testDir = os.path.abspath('.')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeDuplicatePerformance(unittest.TestCase):

Expand All @@ -35,7 +37,11 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

cls._inputDir = os.path.abspath('ProxyShapeDuplicatePerformanceTest')
inputPath = fixturesUtils.setUpClass(__file__,
initializeStandalone=False, loadPlugin=False)

cls._inputDir = os.path.join(inputPath,
'ProxyShapeDuplicatePerformanceTest')

cls._testDir = os.path.abspath('.')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeLiveSurface(unittest.TestCase):

Expand All @@ -39,8 +41,11 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

inputPath = fixturesUtils.readOnlySetUpClass(__file__,
initializeStandalone=False, loadPlugin=False)

cls._testName = 'ProxyShapeLiveSurfaceTest'
cls._inputDir = os.path.abspath(cls._testName)
cls._inputDir = os.path.join(inputPath, cls._testName)

def setUp(self):
mayaSceneFile = '%s.ma' % self._testName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeRendererSceneMessages(unittest.TestCase):

Expand All @@ -32,8 +34,11 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

inputPath = fixturesUtils.setUpClass(__file__,
initializeStandalone=False, loadPlugin=False)

cls._testName = 'ProxyShapeRendererSceneMessagesTest'
cls._inputDir = os.path.abspath(cls._testName)
cls._inputDir = os.path.join(inputPath, cls._testName)

def setUp(self):
cmds.file(new=True, force=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
import sys
import unittest

import fixturesUtils


class testProxyShapeSelectionPerformance(unittest.TestCase):

Expand Down Expand Up @@ -70,7 +72,11 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

cls._inputDir = os.path.abspath('ProxyShapeSelectionPerformanceTest')
inputPath = fixturesUtils.setUpClass(__file__,
initializeStandalone=False, loadPlugin=False)

cls._inputDir = os.path.join(inputPath,
'ProxyShapeSelectionPerformanceTest')

cls._testDir = os.path.abspath('.')

Expand Down
7 changes: 5 additions & 2 deletions test/lib/mayaUsd/render/pxrUsdMayaGL/testPxrUsdMayaGL.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import sys
import unittest

import fixturesUtils


class testPxrUsdMayaGL(unittest.TestCase):

Expand All @@ -30,10 +32,11 @@ def setUpClass(cls):
# that way too.
cmds.upAxis(axis='z')

cmds.loadPlugin('mayaUsdPlugin')
inputPath = fixturesUtils.readOnlySetUpClass(__file__,
initializeStandalone=False)

cls._testName = 'PxrUsdMayaGLTest'
cls._inputDir = os.path.abspath(cls._testName)
cls._inputDir = os.path.join(inputPath, cls._testName)

def testEmptySceneDraws(self):
cmds.file(new=True, force=True)
Expand Down
Loading