mirror of
https://github.com/python/cpython.git
synced 2025-10-17 04:08:28 +00:00
gh-128770: fix ResourceWarning in test_pyrepl (#128906)
This commit is contained in:
parent
a16ded10ad
commit
24c84d816f
1 changed files with 13 additions and 14 deletions
|
@ -1324,8 +1324,7 @@ class TestMain(ReplTestCase):
|
||||||
if readline.backend != "editline":
|
if readline.backend != "editline":
|
||||||
self.skipTest("GNU readline is not affected by this issue")
|
self.skipTest("GNU readline is not affected by this issue")
|
||||||
|
|
||||||
hfile = tempfile.NamedTemporaryFile()
|
with tempfile.NamedTemporaryFile() as hfile:
|
||||||
self.addCleanup(unlink, hfile.name)
|
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env["PYTHON_HISTORY"] = hfile.name
|
env["PYTHON_HISTORY"] = hfile.name
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue