Mercurial > hgsubversion
comparison tests/test_util.py @ 1458:dcf9eff9b5b7
tests: drop unittest2
Mixed using unittest2.SkipTest and unittest.TestCase will cause skips result
in errors. We are probably not going to rewriting every "unittest.TestCase"
to "unittest2.TestCase", then unittest2 is causing more trouble with little
benefit. Let's drop it.
To remain support for Py 26 in run.py, a simple loader.discover is added.
author | Jun Wu <quark@fb.com> |
---|---|
date | Thu, 16 Jun 2016 04:54:51 +0100 |
parents | 019c3e194fba |
children | 7dc5c4368837 |
comparison
equal
deleted
inserted
replaced
1457:019c3e194fba | 1458:dcf9eff9b5b7 |
---|---|
37 obsolete = None | 37 obsolete = None |
38 | 38 |
39 try: | 39 try: |
40 SkipTest = unittest.SkipTest | 40 SkipTest = unittest.SkipTest |
41 except AttributeError: | 41 except AttributeError: |
42 try: | 42 if 'nose' in sys.modules: |
43 from unittest2 import SkipTest | 43 SkipTest = sys.modules['nose'].SkipTest |
44 except ImportError: | 44 else: |
45 try: | 45 SkipTest = None |
46 from nose import SkipTest | |
47 except ImportError: | |
48 SkipTest = None | |
49 | 46 |
50 from hgsubversion import svnwrap | 47 from hgsubversion import svnwrap |
51 from hgsubversion import util | 48 from hgsubversion import util |
52 from hgsubversion import svnwrap | 49 from hgsubversion import svnwrap |
53 | 50 |