Commit a65b6ea0 authored by Toshio Kuratomi's avatar Toshio Kuratomi

Skip test when file system encoding is not suitable. Fixes #55 and Distribute #363.

parent 49ce8061
...@@ -10,6 +10,8 @@ CHANGES ...@@ -10,6 +10,8 @@ CHANGES
launcher for 'develop' installs). launcher for 'develop' installs).
* ``ez_setup.py`` now ensures partial downloads are cleaned up following * ``ez_setup.py`` now ensures partial downloads are cleaned up following
a failed download. a failed download.
* Distribute #363 and Issue #55: Skip an sdist test that fails on locales
other than UTF-8.
----- -----
1.1.6 1.1.6
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""sdist tests""" """sdist tests"""
import locale
import os import os
import shutil import shutil
import sys import sys
...@@ -10,6 +10,7 @@ import unittest ...@@ -10,6 +10,7 @@ import unittest
import unicodedata import unicodedata
from setuptools.compat import StringIO, unicode from setuptools.compat import StringIO, unicode
from setuptools.tests.py26compat import skipIf
from setuptools.command.sdist import sdist from setuptools.command.sdist import sdist
from setuptools.command.egg_info import manifest_maker from setuptools.command.egg_info import manifest_maker
from setuptools.dist import Distribution from setuptools.dist import Distribution
...@@ -318,6 +319,8 @@ class TestSdistTest(unittest.TestCase): ...@@ -318,6 +319,8 @@ class TestSdistTest(unittest.TestCase):
filename = filename.decode('latin-1') filename = filename.decode('latin-1')
self.assertFalse(filename in cmd.filelist.files) 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): def test_sdist_with_utf8_encoded_filename(self):
# Test for #303. # Test for #303.
dist = Distribution(SETUP_ATTRS) dist = Distribution(SETUP_ATTRS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment