summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-03-15 00:03:36 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-03-15 00:03:36 (GMT)
commit22a8cbe8af8a50aa9c60e50af0ea2e0fe934be06 (patch)
treef418e043a5f60753e09263e6027cf527bc14a20f
parentfe93faf98c0866c20f05dc009a8ac2fecee80692 (diff)
downloadcpython-22a8cbe8af8a50aa9c60e50af0ea2e0fe934be06.zip
cpython-22a8cbe8af8a50aa9c60e50af0ea2e0fe934be06.tar.gz
cpython-22a8cbe8af8a50aa9c60e50af0ea2e0fe934be06.tar.bz2
Issue #3080: skip test_bdist_rpm if sys.executable is not encodable to UTF-8
-rw-r--r--Lib/distutils/tests/test_bdist_rpm.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/distutils/tests/test_bdist_rpm.py b/Lib/distutils/tests/test_bdist_rpm.py
index 804fb13..030933f 100644
--- a/Lib/distutils/tests/test_bdist_rpm.py
+++ b/Lib/distutils/tests/test_bdist_rpm.py
@@ -28,6 +28,11 @@ class BuildRpmTestCase(support.TempdirManager,
unittest.TestCase):
def setUp(self):
+ try:
+ sys.executable.encode("UTF-8")
+ except UnicodeEncodeError:
+ raise unittest.SkipTest("sys.executable is not encodable to UTF-8")
+
super(BuildRpmTestCase, self).setUp()
self.old_location = os.getcwd()
self.old_sys_argv = sys.argv, sys.argv[:]