diff options
Diffstat (limited to 'tests/test_distribute_setup.py')
-rw-r--r-- | tests/test_distribute_setup.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_distribute_setup.py b/tests/test_distribute_setup.py index 4151587f..37c6cf82 100644 --- a/tests/test_distribute_setup.py +++ b/tests/test_distribute_setup.py @@ -17,7 +17,7 @@ import distribute_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) @@ -28,7 +28,7 @@ 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 + from setuptools.compat import urllib2 urllib2.urlopen = self.urlopen def tearDown(self): @@ -38,7 +38,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 |