about summary refs log tree commit diff
path: root/pkgs/development/python-modules/setuptools/distribute-skip-sdist_with_utf8_encoded_filename.patch
blob: 96a4f81ee5819955bc9488685959db6f8bee968e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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)