diff options
| author | Zachary Ware <zachary.ware@gmail.com> | 2015-10-13 04:31:44 (GMT) |
|---|---|---|
| committer | Zachary Ware <zachary.ware@gmail.com> | 2015-10-13 04:31:44 (GMT) |
| commit | fcd8794ab51b72174e7d36f7998cd146474308c9 (patch) | |
| tree | 23ee06f9590cb8f884af1927c15260cc3cd10d73 /Lib | |
| parent | f7d2471260a5c0e9c957924881dbe6610c9aaf23 (diff) | |
| parent | fa10f61ee54892cc9fc7e08c01dec06f37522156 (diff) | |
| download | cpython-fcd8794ab51b72174e7d36f7998cd146474308c9.zip cpython-fcd8794ab51b72174e7d36f7998cd146474308c9.tar.gz cpython-fcd8794ab51b72174e7d36f7998cd146474308c9.tar.bz2 | |
Closes #25093: Merge with 3.5
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/test/test_tcl.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py index 5be645a..25f6ede 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 @@ -242,11 +243,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 |
