]> granicus.if.org Git - python/commitdiff
Issue #3080: skip test_bdist_rpm if sys.executable is not encodable to UTF-8
authorVictor Stinner <victor.stinner@haypocalc.com>
Tue, 15 Mar 2011 00:03:36 +0000 (20:03 -0400)
committerVictor Stinner <victor.stinner@haypocalc.com>
Tue, 15 Mar 2011 00:03:36 +0000 (20:03 -0400)
Lib/distutils/tests/test_bdist_rpm.py

index 804fb1355f28eeedf86e1babf9ac1e49a07a2bff..030933f17c854b74d09a70d2ab0b27dc650e6358 100644 (file)
@@ -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[:]