changeset: 68740:cc7c0f6f60bf user: Victor Stinner date: Mon Mar 14 20:03:36 2011 -0400 files: Lib/distutils/tests/test_bdist_rpm.py description: Issue #3080: skip test_bdist_rpm if sys.executable is not encodable to UTF-8 diff -r 80f4bd647695 -r cc7c0f6f60bf Lib/distutils/tests/test_bdist_rpm.py --- a/Lib/distutils/tests/test_bdist_rpm.py Mon Mar 14 15:54:52 2011 -0400 +++ b/Lib/distutils/tests/test_bdist_rpm.py Mon Mar 14 20:03:36 2011 -0400 @@ -28,6 +28,11 @@ 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[:]