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

This commit is contained in:
Victor Stinner 2011-03-14 20:03:36 -04:00
parent fe93faf98c
commit 22a8cbe8af

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