File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -108,11 +108,6 @@ def test_{count}_{header}():
108
108
import os
109
109
import sys
110
110
111
- # For nose
112
- import collections
113
- if not hasattr(collections, "Callable"):
114
- collections.Callable = collections.abc.Callable
115
-
116
111
import nose
117
112
from nose.tools import assert_raises
118
113
@@ -121,6 +116,11 @@ def test_{count}_{header}():
121
116
from maya import standalone
122
117
standalone.initialize()
123
118
119
+ # For nose
120
+ if sys.version_info[0] == 3:
121
+ import collections
122
+ collections.Callable = collections.abc.Callable
123
+
124
124
from maya import cmds
125
125
import cmdx
126
126
@@ -133,6 +133,11 @@ def test_{count}_{header}():
133
133
])
134
134
135
135
result = nose.main(argv=argv, exit=False)
136
+
137
+ if os.name == "nt":
138
+ # Graceful exit, only Windows seems to like this consistently
139
+ standalone.uninitialize()
140
+
136
141
os._exit(0 if result.success else 1)
137
142
""" )
138
143
f .write ("" .join (tests ))
Original file line number Diff line number Diff line change 6
6
import flaky .flaky_nose_plugin as flaky
7
7
8
8
# For nose
9
- import collections
10
- if not hasattr ( collections , "Callable" ):
9
+ if sys . version_info [ 0 ] == 3 :
10
+ import collections
11
11
collections .Callable = collections .abc .Callable
12
12
13
13
You can’t perform that action at this time.
0 commit comments