diff options
| author | Philip Thiem <ptthiem@gmail.com> | 2014-04-24 23:06:09 -0500 |
|---|---|---|
| committer | Philip Thiem <ptthiem@gmail.com> | 2014-04-24 23:06:09 -0500 |
| commit | b9a53c47f66dbc41e3e9ba8bd29932d1ca6a589f (patch) | |
| tree | 1a23663881c0624cbb148fbb531b8243ae9dee66 | |
| parent | ab771bb9808eed095eb5dcf52d3262335abd39af (diff) | |
| download | python-setuptools-git-b9a53c47f66dbc41e3e9ba8bd29932d1ca6a589f.tar.gz | |
test_sdist: change the latin1 test to match the behavior of write_manifest
| -rw-r--r-- | setuptools/tests/test_sdist.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 09a58621..31768e21 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -397,9 +397,20 @@ class TestSdistTest(unittest.TestCase): filename = filename.decode('latin-1') self.assertFalse(filename in cmd.filelist.files) else: - # No conversion takes place under Python 2 and the file - # is included. We shall keep it that way for BBB. - self.assertTrue(filename in cmd.filelist.files) + # Under Python 2 there seems to be no decoding of the + # filelist. However, due to decode and encoding of the + # file name to utf-8 + try: + #This seems a bit iffy, but not really what else + #since cmd.filelist.files is not encoded, but + #want to write out the manifest as UTF-8/ + + #This is how one expected the filename to be decoded + fs_enc = sys.getfilesystemencoding() + filename.decode(fs_enc) + self.assertTrue(filename in cmd.filelist.files) + except UnicodeDecodeError: + self.assertFalse(filename in cmd.filelist.files) class TestDummyOutput(environment.ZippedEnvironment): |
