nixpkgs/pkgs/development/python-modules/setuptools/distribute-skip-sdist_with_utf8_encoded_filename.patch

29 lines
953 B
Diff
Raw Normal View History

2013-07-27 18:51:54 +00:00
diff -r f5ac515f062a setuptools/tests/test_sdist.py
--- a/setuptools/tests/test_sdist.py Fri Jul 26 09:52:26 2013 +0200
+++ b/setuptools/tests/test_sdist.py Sat Jul 27 20:22:17 2013 +0200
@@ -3,12 +3,14 @@
import os
+import locale
import shutil
import sys
import tempfile
import unittest
import unicodedata
+from setuptools.tests.py26compat import skipIf
from setuptools.compat import StringIO, unicode
from setuptools.command.sdist import sdist
from setuptools.command.egg_info import manifest_maker
@@ -318,6 +320,9 @@
filename = filename.decode('latin-1')
self.assertFalse(filename in cmd.filelist.files)
+
+ @skipIf(sys.version_info >= (3,) and locale.getpreferredencoding() != 'UTF-8',
+ 'Unittest fails if locale is not utf-8 but the manifests is recorded correctly')
def test_sdist_with_utf8_encoded_filename(self):
# Test for #303.
dist = Distribution(SETUP_ATTRS)