(self)
| 1366 | |
| 1367 | @unittest.skipUnless(support.Py_DEBUG, 'need a debug build') |
| 1368 | def test_huntrleaks_fd_leak(self): |
| 1369 | # test --huntrleaks for file descriptor leak |
| 1370 | code = textwrap.dedent(""" |
| 1371 | import os |
| 1372 | import unittest |
| 1373 | |
| 1374 | class FDLeakTest(unittest.TestCase): |
| 1375 | def test_leak(self): |
| 1376 | fd = os.open(__file__, os.O_RDONLY) |
| 1377 | # bug: never close the file descriptor |
| 1378 | """) |
| 1379 | self.check_leak(code, 'file descriptors') |
| 1380 | |
| 1381 | def test_list_tests(self): |
| 1382 | # test --list-tests |
nothing calls this directly
no test coverage detected