##// END OF EJS Templates
Don't monkeypatch nose in Python 3, as it must be a newer version.
Thomas Kluyver -
Show More
@@ -17,6 +17,7 b' Note: merely importing this module causes the monkeypatch to be applied."""'
17 #-----------------------------------------------------------------------------
17 #-----------------------------------------------------------------------------
18
18
19 import unittest
19 import unittest
20 import sys
20 import nose.loader
21 import nose.loader
21 from inspect import ismethod, isfunction
22 from inspect import ismethod, isfunction
22
23
@@ -64,5 +65,7 b' def getTestCaseNames(self, testCaseClass):'
64
65
65 ##########################################################################
66 ##########################################################################
66 # Apply monkeypatch here
67 # Apply monkeypatch here
67 nose.loader.TestLoader.getTestCaseNames = getTestCaseNames
68 # Python 3 must be running with newer version of Nose, so don't touch anything.
69 if sys.version_info[0] < 3:
70 nose.loader.TestLoader.getTestCaseNames = getTestCaseNames
68 ##########################################################################
71 ##########################################################################
General Comments 0
You need to be logged in to leave comments. Login now