Commit 043fefd1 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Fixed test_tempfilepager in test_pydoc on Windows.

Filename such as r'c:\users\db3l\appdata\local\temp\tmph3vkvf' contains '\t'
which is interpreted by ast.literal_eval() as a tabulation.
parent d3e4ddcc
......@@ -473,8 +473,9 @@ class TestUnicode(unittest.TestCase):
output = {}
def mock_system(cmd):
import ast
output['content'] = open(ast.literal_eval(cmd.strip())).read()
filename = cmd.strip()[1:-1]
self.assertEqual('"' + filename + '"', cmd.strip())
output['content'] = open(filename).read()
saved, os.system = os.system, mock_system
try:
pydoc.tempfilepager(doc, '')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment