Attila Fazekas | 522cfe0 | 2014-04-11 11:14:07 +0200 | [diff] [blame] | 1 | diff -r b2efb7df637b discover.py |
| 2 | --- a/discover.py Thu Mar 24 00:31:02 2011 -0400 |
| 3 | +++ b/discover.py Thu Nov 28 12:02:19 2013 +0000 |
| 4 | @@ -82,7 +82,11 @@ |
| 5 | """ |
| 6 | testMethodPrefix = 'test' |
| 7 | sortTestMethodsUsing = cmp |
| 8 | - suiteClass = unittest.TestSuite |
| 9 | + try: |
| 10 | + import unittest2 |
| 11 | + suiteClass = unittest2.TestSuite |
| 12 | + except ImportError: |
| 13 | + suiteClass = unittest.TestSuite |
| 14 | _top_level_dir = None |
| 15 | |
| 16 | def loadTestsFromTestCase(self, testCaseClass): |