devstack/files/patches/unittest2-discover.patch
Attila Fazekas 522cfe0951 tempest py26 setup
Simplifying the steps between devstack install and tempest run, by
 * installing tox<1.7, bacuse 1.7 is not compatible with our tox.ini
 * installing and patching 'discover' when the python version is 2.6

Change-Id: I8008837d2fae6cebeeeb051b63066279ca477e01
2014-05-05 07:36:49 +02:00

17 lines
485 B
Diff

diff -r b2efb7df637b discover.py
--- a/discover.py Thu Mar 24 00:31:02 2011 -0400
+++ b/discover.py Thu Nov 28 12:02:19 2013 +0000
@@ -82,7 +82,11 @@
"""
testMethodPrefix = 'test'
sortTestMethodsUsing = cmp
- suiteClass = unittest.TestSuite
+ try:
+ import unittest2
+ suiteClass = unittest2.TestSuite
+ except ImportError:
+ suiteClass = unittest.TestSuite
_top_level_dir = None
def loadTestsFromTestCase(self, testCaseClass):