Commit 794e5573 authored by Ezio Melotti's avatar Ezio Melotti

#17833: add debug output to investigate buildbot failure.

parent a74e5c80
...@@ -4,6 +4,7 @@ import unittest ...@@ -4,6 +4,7 @@ import unittest
import sys import sys
import os import os
from test import test_support from test import test_support
from subprocess import Popen, PIPE
# Skip this test if the _tkinter module wasn't built. # Skip this test if the _tkinter module wasn't built.
_tkinter = test_support.import_module('_tkinter') _tkinter = test_support.import_module('_tkinter')
...@@ -146,11 +147,20 @@ class TclTest(unittest.TestCase): ...@@ -146,11 +147,20 @@ class TclTest(unittest.TestCase):
with test_support.EnvironmentVarGuard() as env: with test_support.EnvironmentVarGuard() as env:
env.unset("TCL_LIBRARY") env.unset("TCL_LIBRARY")
f = os.popen('%s -c "import Tkinter; print Tkinter"' % (unc_name,)) cmd = '%s -c "import Tkinter; print Tkinter"' % (unc_name,)
p = Popen(cmd, stdout=PIPE, stderr=PIPE)
out_data, err_data = p.communicate()
msg = '\n\n'.join(['"Tkinter.py" not in output',
'Command:', cmd,
'stdout:', out_data,
'stderr:', err_data])
self.assertIn('Tkinter.py', out_data, msg)
self.assertEqual(p.wait(), 0, 'Non-zero exit code')
self.assertIn('Tkinter.py', f.read())
# exit code must be zero
self.assertEqual(f.close(), None)
def test_passing_values(self): def test_passing_values(self):
def passValue(value): def passValue(value):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment