Commits

Victor Stinner committed cc7c0f6

Issue #3080: skip test_bdist_rpm if sys.executable is not encodable to UTF-8

Comments (0)

Files changed (1)

Lib/distutils/tests/test_bdist_rpm.py

                        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[:]