[Python-checkins] cpython (merge 3.5 -> default): Closes #25093: Merge with 3.5

zach.ware python-checkins at python.org
Tue Oct 13 00:32:07 EDT 2015


https://hg.python.org/cpython/rev/a345d1c70d95
changeset:   98722:a345d1c70d95
parent:      98719:978b7dfcb6f1
parent:      98721:a557ec9c8b12
user:        Zachary Ware <zachary.ware at gmail.com>
date:        Mon Oct 12 23:31:44 2015 -0500
summary:
  Closes #25093: Merge with 3.5

files:
  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
--- 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 @@
 
         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

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list