mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-41069: Make TESTFN and the CWD for tests containing non-ascii characters. (GH-21035)
This commit is contained in:
parent
8ea6353f60
commit
700cfa8c90
24 changed files with 110 additions and 77 deletions
|
@ -41,8 +41,9 @@ class TestCgitb(unittest.TestCase):
|
|||
rc, out, err = assert_python_failure(
|
||||
'-c',
|
||||
('import cgitb; cgitb.enable(logdir=%s); '
|
||||
'raise ValueError("Hello World")') % repr(tracedir))
|
||||
out = out.decode(sys.getfilesystemencoding())
|
||||
'raise ValueError("Hello World")') % repr(tracedir),
|
||||
PYTHONIOENCODING='utf-8')
|
||||
out = out.decode()
|
||||
self.assertIn("ValueError", out)
|
||||
self.assertIn("Hello World", out)
|
||||
self.assertIn("<strong><module></strong>", out)
|
||||
|
@ -56,8 +57,9 @@ class TestCgitb(unittest.TestCase):
|
|||
rc, out, err = assert_python_failure(
|
||||
'-c',
|
||||
('import cgitb; cgitb.enable(format="text", logdir=%s); '
|
||||
'raise ValueError("Hello World")') % repr(tracedir))
|
||||
out = out.decode(sys.getfilesystemencoding())
|
||||
'raise ValueError("Hello World")') % repr(tracedir),
|
||||
PYTHONIOENCODING='utf-8')
|
||||
out = out.decode()
|
||||
self.assertIn("ValueError", out)
|
||||
self.assertIn("Hello World", out)
|
||||
self.assertNotIn('<p>', out)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue