summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_popen.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_popen.py')
-rw-r--r--Lib/test/test_popen.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_popen.py b/Lib/test/test_popen.py
index 2457396..fba3f41 100644
--- a/Lib/test/test_popen.py
+++ b/Lib/test/test_popen.py
@@ -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)