summaryrefslogtreecommitdiff
path: root/Lib/test/test_openpty.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_openpty.py')
-rw-r--r--Lib/test/test_openpty.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_openpty.py b/Lib/test/test_openpty.py
index 8713d34671..47851072c1 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.")