summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2013-06-19 11:45:38 +0100
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2013-06-19 11:45:38 +0100
commite1a9b4dcc7b67e61b28fdefd33495ecc0fd7313b (patch)
treef3434e338d7a1573cff64cc131b6cd32fdd3091e /tests
parent1961cbe6164c403810e07f39c88c58241fac2d41 (diff)
parent7834517bc7b158e4b85d6a4a4a425a2f4593d3db (diff)
downloadpython-setuptools-bitbucket-e1a9b4dcc7b67e61b28fdefd33495ecc0fd7313b.tar.gz
Merged upstream changes.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_ez_setup.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/test_ez_setup.py b/tests/test_ez_setup.py
index 6dd4c055..26881f52 100644
--- a/tests/test_ez_setup.py
+++ b/tests/test_ez_setup.py
@@ -16,7 +16,7 @@ import ez_setup
class TestSetup(unittest.TestCase):
def urlopen(self, url):
- return open(self.tarball)
+ return open(self.tarball, 'rb')
def setUp(self):
self.old_sys_path = copy.copy(sys.path)
@@ -27,10 +27,7 @@ class TestSetup(unittest.TestCase):
"--dist-dir", "%s" % self.tmpdir)
tarball = os.listdir(self.tmpdir)[0]
self.tarball = os.path.join(self.tmpdir, tarball)
- try:
- import urllib2
- except ImportError:
- import urllib.request as urllib2
+ from setuptools.compat import urllib2
urllib2.urlopen = self.urlopen
def tearDown(self):
@@ -40,7 +37,7 @@ class TestSetup(unittest.TestCase):
def test_build_egg(self):
# making it an egg
- egg = _build_egg(self.tarball, self.tmpdir)
+ egg = _build_egg('Egg to be built', self.tarball, self.tmpdir)
# now trying to import it
sys.path[0] = egg