Kaydet (Commit) 270fe408 authored tarafından Victor Stinner's avatar Victor Stinner

test_tkinter: use a context manager to close directly the pipe

Patch written by Nadeem Vawda
üst 5c85e3f3
...@@ -31,7 +31,8 @@ class TkLoadTest(unittest.TestCase): ...@@ -31,7 +31,8 @@ class TkLoadTest(unittest.TestCase):
# doesn't actually carry through to the process level # doesn't actually carry through to the process level
# because they don't support unsetenv # because they don't support unsetenv
# If that's the case, abort. # If that's the case, abort.
display = os.popen('echo $DISPLAY').read().strip() with os.popen('echo $DISPLAY') as pipe:
display = pipe.read().strip()
if display: if display:
return return
......
...@@ -866,6 +866,7 @@ Andrew Vant ...@@ -866,6 +866,7 @@ Andrew Vant
Atul Varma Atul Varma
Dmitry Vasiliev Dmitry Vasiliev
Alexandre Vassalotti Alexandre Vassalotti
Nadeem Vawda
Frank Vercruesse Frank Vercruesse
Mike Verdone Mike Verdone
Jaap Vermeulen Jaap Vermeulen
......
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