summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tcl.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-10-13 04:27:58 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2015-10-13 04:27:58 (GMT)
commit83fd0a81a4afff60339b0ead31c3b8317b29fd55 (patch)
treee87290ee0f96f254028160358561aaf765f0ff61 /Lib/test/test_tcl.py
parentb39518808849a9286c59e703cfd56845b54a6adf (diff)
downloadcpython-83fd0a81a4afff60339b0ead31c3b8317b29fd55.zip
cpython-83fd0a81a4afff60339b0ead31c3b8317b29fd55.tar.gz
cpython-83fd0a81a4afff60339b0ead31c3b8317b29fd55.tar.bz2
Issue #25093: Fix test_tcl's testloadWithUNC for paths with spaces
Patch by Serhiy Storchaka.
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r--Lib/test/test_tcl.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index 66e9d49..b656563 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -1,5 +1,6 @@
import unittest
import re
+import subprocess
import sys
import os
from test import support
@@ -246,11 +247,10 @@ class TclTest(unittest.TestCase):
with support.EnvironmentVarGuard() as env:
env.unset("TCL_LIBRARY")
- f = os.popen('%s -c "import tkinter; print(tkinter)"' % (unc_name,))
+ stdout = subprocess.check_output(
+ [unc_name, '-c', 'import tkinter; print(tkinter)'])
- self.assertIn('tkinter', f.read())
- # exit code must be zero
- self.assertEqual(f.close(), None)
+ self.assertIn(b'tkinter', stdout)
def test_exprstring(self):
tcl = self.interp