diff options
author | Richard Oudkerk <shibturn@gmail.com> | 2013-06-10 16:27:45 +0100 |
---|---|---|
committer | Richard Oudkerk <shibturn@gmail.com> | 2013-06-10 16:27:45 +0100 |
commit | 045e4579928768c0c40ae174aaa3bec1a53dc431 (patch) | |
tree | a0eced1d868f205a6aef4b2c13868ea22271968b /Lib/test/test_openpty.py | |
parent | 0e6283e68a9d6035e68a91904f13733df512dbce (diff) | |
download | cpython-git-045e4579928768c0c40ae174aaa3bec1a53dc431.tar.gz |
Issue #18174: Fix fd leaks in tests.
Diffstat (limited to 'Lib/test/test_openpty.py')
-rw-r--r-- | Lib/test/test_openpty.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_openpty.py b/Lib/test/test_openpty.py index 20c4fe239c..4b34b3a3c7 100644 --- a/Lib/test/test_openpty.py +++ b/Lib/test/test_openpty.py @@ -10,6 +10,8 @@ if not hasattr(os, "openpty"): class OpenptyTest(unittest.TestCase): def test(self): master, slave = os.openpty() + self.addCleanup(os.close, master) + self.addCleanup(os.close, slave) if not os.isatty(slave): self.fail("Slave-end of pty is not a terminal.") |