From e594505ae0d7ba2258f47edfb48bad0b558c2424 Mon Sep 17 00:00:00 2001 From: Hamed Sabri Date: Tue, 2 Jun 2020 20:03:06 -0400 Subject: [PATCH] Address feedbacks. --- .../testenv/testProxyShapeDuplicatePerformance.py | 2 +- .../lib/usdMaya/testenv/testUsdMayaDiagnosticDelegate.py | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/plugin/pxr/maya/lib/pxrUsdMayaGL/testenv/testProxyShapeDuplicatePerformance.py b/plugin/pxr/maya/lib/pxrUsdMayaGL/testenv/testProxyShapeDuplicatePerformance.py index f173c69867..fba7fe478e 100644 --- a/plugin/pxr/maya/lib/pxrUsdMayaGL/testenv/testProxyShapeDuplicatePerformance.py +++ b/plugin/pxr/maya/lib/pxrUsdMayaGL/testenv/testProxyShapeDuplicatePerformance.py @@ -47,7 +47,7 @@ def setUpClass(cls): @classmethod def tearDownClass(cls): statsOutputLines = [] - for profileScopeName, elapsedTime in cls._profileScopeMetrics.iteritems(): + for profileScopeName, elapsedTime in iteritems(cls._profileScopeMetrics): statsDict = { 'profile': profileScopeName, 'metric': 'time', diff --git a/plugin/pxr/maya/lib/usdMaya/testenv/testUsdMayaDiagnosticDelegate.py b/plugin/pxr/maya/lib/usdMaya/testenv/testUsdMayaDiagnosticDelegate.py index 6b394ee4d4..529986a56b 100644 --- a/plugin/pxr/maya/lib/usdMaya/testenv/testUsdMayaDiagnosticDelegate.py +++ b/plugin/pxr/maya/lib/usdMaya/testenv/testUsdMayaDiagnosticDelegate.py @@ -39,6 +39,9 @@ def setUp(self): self.messageLog = [] self.callback = None cmds.loadPlugin('pxrUsd', quiet=True) + # assertCountEqual in python 3 is equivalent to assertItemsEqual + if sys.version_info[0] >= 3: + self.assertItemsEqual = self.assertCountEqual def _OnCommandOutput(self, message, messageType, _): if (messageType == OM.MCommandMessage.kInfo @@ -124,9 +127,6 @@ def testBatching(self): pass log = self._StopRecording() - # assertCountEqual in python 3 is equivalent to assertItemsEqual - if sys.version_info[0] >= 3: - self.assertItemsEqual = self.assertCountEqual # Note: we use assertItemsEqual because coalescing may re-order the # diagnostic messages. self.assertItemsEqual(log, [ @@ -151,9 +151,6 @@ def testBatching_DelegateRemoved(self): Tf.Status("no delegate, this will be lost %d" % i) log = self._StopRecording() - # assertCountEqual in python 3 is equivalent to assertItemsEqual - if sys.version_info[0] >= 3: - self.assertItemsEqual = self.assertCountEqual # Note: we use assertItemsEqual because coalescing may re-order the # diagnostic messages. self.assertItemsEqual(log, [