mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #25093: Fix test_tcl's testloadWithUNC for paths with spaces
Patch by Serhiy Storchaka.
This commit is contained in:
parent
b395188088
commit
83fd0a81a4
1 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
import unittest
|
import unittest
|
||||||
import re
|
import re
|
||||||
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
from test import support
|
from test import support
|
||||||
|
@ -246,11 +247,10 @@ class TclTest(unittest.TestCase):
|
||||||
|
|
||||||
with support.EnvironmentVarGuard() as env:
|
with support.EnvironmentVarGuard() as env:
|
||||||
env.unset("TCL_LIBRARY")
|
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())
|
self.assertIn(b'tkinter', stdout)
|
||||||
# exit code must be zero
|
|
||||||
self.assertEqual(f.close(), None)
|
|
||||||
|
|
||||||
def test_exprstring(self):
|
def test_exprstring(self):
|
||||||
tcl = self.interp
|
tcl = self.interp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue