mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
Fix some problems introduced by the str8 repr change.
This commit is contained in:
parent
a092947d26
commit
aa588c4699
3 changed files with 9 additions and 2 deletions
|
@ -18,8 +18,10 @@ if ' ' in python:
|
|||
python = '"' + python + '"' # quote embedded space for cmdline
|
||||
|
||||
class PopenTest(unittest.TestCase):
|
||||
|
||||
def _do_test_commandline(self, cmdline, expected):
|
||||
cmd = '%s -c "import sys; print(sys.argv)" %s' % (python, cmdline)
|
||||
cmd = '%s -c "import sys; print(list(map(str, sys.argv)))" %s'
|
||||
cmd = cmd % (python, cmdline)
|
||||
data = os.popen(cmd).read()
|
||||
got = eval(data)[1:] # strip off argv[0]
|
||||
self.assertEqual(got, expected)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue