diff options
| author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-06-15 15:34:53 +0100 |
|---|---|---|
| committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2013-06-15 15:34:53 +0100 |
| commit | 8e657eac1ef02faedca99df319fff6b63f4a4305 (patch) | |
| tree | f3f2ed97342421c6b65c9caaab8ae5d830f04059 /setuptools/tests/test_sdist.py | |
| parent | c04abca662dcbffd00d928e06fbf32b9f49f8e57 (diff) | |
| download | python-setuptools-git-8e657eac1ef02faedca99df319fff6b63f4a4305.tar.gz | |
Initial commit. All tests pass on 2.7, 3.2 and 3.3, though there are some atexit errors in the multiprocessing module in 2.7/3.2 (seemingly unrelated to setuptools).
--HG--
branch : single-codebase
Diffstat (limited to 'setuptools/tests/test_sdist.py')
| -rw-r--r-- | setuptools/tests/test_sdist.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index f51d4567..c1e7864b 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -7,11 +7,10 @@ import shutil import sys import tempfile import unittest -import urllib import unicodedata -from StringIO import StringIO +from setuptools.compat import StringIO, quote, unicode from setuptools.command.sdist import sdist from setuptools.command.egg_info import manifest_maker from setuptools.dist import Distribution @@ -149,7 +148,8 @@ class TestSdistTest(unittest.TestCase): # The manifest should be UTF-8 encoded try: u_contents = contents.decode('UTF-8') - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) # The manifest should contain the UTF-8 filename @@ -190,7 +190,8 @@ class TestSdistTest(unittest.TestCase): # The manifest should be UTF-8 encoded try: contents.decode('UTF-8') - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) # The manifest should contain the UTF-8 filename @@ -228,7 +229,8 @@ class TestSdistTest(unittest.TestCase): # The manifest should be UTF-8 encoded try: contents.decode('UTF-8') - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) # The Latin-1 filename should have been skipped @@ -307,7 +309,8 @@ class TestSdistTest(unittest.TestCase): try: try: cmd.read_manifest() - except UnicodeDecodeError, e: + except UnicodeDecodeError: + e = sys.exc_info()[1] self.fail(e) finally: unquiet() |
