aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_ez_setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_ez_setup.py')
-rw-r--r--tests/test_ez_setup.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_ez_setup.py b/tests/test_ez_setup.py
index 922bd884..6dd4c055 100644
--- a/tests/test_ez_setup.py
+++ b/tests/test_ez_setup.py
@@ -27,7 +27,10 @@ class TestSetup(unittest.TestCase):
"--dist-dir", "%s" % self.tmpdir)
tarball = os.listdir(self.tmpdir)[0]
self.tarball = os.path.join(self.tmpdir, tarball)
- import urllib2
+ try:
+ import urllib2
+ except ImportError:
+ import urllib.request as urllib2
urllib2.urlopen = self.urlopen
def tearDown(self):