Skip to content

Commit

Permalink
Repair tests for 2023 and 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
mottosso committed Dec 14, 2023
1 parent 22f9e6b commit 976cae8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<a href=/cmdx/><p align=center><img height=140 src=https://user-images.githubusercontent.com/2152766/34321609-f134e0cc-e80a-11e7-8dad-d124fea80e77.png></p></a>

<p align=center>A fast subset of <a href=http://help.autodesk.com/cloudhelp/2018/ENU/Maya-Tech-Docs/CommandsPython/index.html><code>maya.cmds</code></a><br>For Maya 2017-2022</p>
<p align=center>A fast subset of <a href=http://help.autodesk.com/cloudhelp/2018/ENU/Maya-Tech-Docs/CommandsPython/index.html><code>maya.cmds</code></a><br>For Maya 2018-2024</p>

<br>

Expand Down
12 changes: 6 additions & 6 deletions cmdx.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ def timings_decorator(func):

@wraps(func)
def func_wrapper(*args, **kwargs):
t0 = time_.clock()
t0 = time_.perf_counter()

try:
return func(*args, **kwargs)
finally:
t1 = time_.clock()
t1 = time_.perf_counter()
duration = (t1 - t0) * 10 ** 6 # microseconds

Stats.LastTiming = duration
Expand Down Expand Up @@ -2833,10 +2833,10 @@ def clone(self, name, shortName=None, niceName=None):
>>> clone = original.clone("focalClone")
# Original setup is preserved
>>> clone["min"]
2.5
>>> clone["max"]
100000.0
>>> clone["min"] == original.fn().getMin()
True
>>> clone["max"] == original.fn().getMax()
True
>>> cam.addAttr(clone)
>>> cam["focalClone"].read()
Expand Down
8 changes: 8 additions & 0 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
import nose
import flaky.flaky_nose_plugin as flaky

# For nose
if sys.version_info[0] == 3:
import collections
collections.Callable = collections.abc.Callable


if __name__ == "__main__":
print("Initialising Maya..")
from maya import standalone, cmds
Expand All @@ -28,6 +34,8 @@
"cmdx.py",
])

cmds.colorManagementPrefs(cmEnabled=False, edit=True)

result = nose.main(
argv=argv,
addplugins=[flaky.FlakyPlugin()],
Expand Down

0 comments on commit 976cae8

Please sign in to comment.