comparison Lib/test/test_httpservers.py @ 81996:d867a9898a53

Do not raise self.skipTest(). skipTest() already raises an exception.
author Serhiy Storchaka <storchaka@gmail.com>
date Mon, 04 Feb 2013 15:46:18 +0200
parents ad51ed93377c 872ede983e7b
children 59292f366b53
comparison
equal deleted inserted replaced
81993:e6d6b860a720 81996:d867a9898a53
349 # CGI Python script. The encoding cookie cannot be used, and so the 349 # CGI Python script. The encoding cookie cannot be used, and so the
350 # path should be encodable to the default script encoding (utf-8) 350 # path should be encodable to the default script encoding (utf-8)
351 self.pythonexe.encode('utf-8') 351 self.pythonexe.encode('utf-8')
352 except UnicodeEncodeError: 352 except UnicodeEncodeError:
353 self.tearDown() 353 self.tearDown()
354 raise self.skipTest( 354 self.skipTest("Python executable path is not encodable to utf-8")
355 "Python executable path is not encodable to utf-8")
356 355
357 self.file1_path = os.path.join(self.cgi_dir, 'file1.py') 356 self.file1_path = os.path.join(self.cgi_dir, 'file1.py')
358 with open(self.file1_path, 'w', encoding='utf-8') as file1: 357 with open(self.file1_path, 'w', encoding='utf-8') as file1:
359 file1.write(cgi_file1 % self.pythonexe) 358 file1.write(cgi_file1 % self.pythonexe)
360 os.chmod(self.file1_path, 0o777) 359 os.chmod(self.file1_path, 0o777)