comparison tests/test_util.py @ 734:e24fb3e27ec9

test_util: use SkipTest if provided by the unittest module. This is the case with Python 2.7.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sat, 09 Oct 2010 16:20:52 -0500
parents e830b592917b
children 045120d3a110
comparison
equal deleted inserted replaced
733:bfb88a304ebe 734:e24fb3e27ec9
24 from mercurial import node 24 from mercurial import node
25 from mercurial import ui 25 from mercurial import ui
26 from mercurial import extensions 26 from mercurial import extensions
27 27
28 try: 28 try:
29 from unittest2 import SkipTest 29 SkipTest = unittest.SkipTest
30 except ImportError: 30 except AttributeError:
31 try: 31 try:
32 from nose import SkipTest 32 from unittest2 import SkipTest
33 except ImportError: 33 except ImportError:
34 SkipTest = None 34 try:
35 from nose import SkipTest
36 except ImportError:
37 SkipTest = None
35 38
36 from hgsubversion import util 39 from hgsubversion import util
37 40
38 # Documentation for Subprocess.Popen() says: 41 # Documentation for Subprocess.Popen() says:
39 # "Note that on Windows, you cannot set close_fds to true and 42 # "Note that on Windows, you cannot set close_fds to true and