From a8b9c331fd7a69c9a89083886b7b47b3bba6f78a Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Thu, 4 Feb 2021 19:04:29 -0800 Subject: Close file descriptors when subprocess ends --- tests/test_nsjail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_nsjail.py b/tests/test_nsjail.py index 7e7df9b..820f57e 100644 --- a/tests/test_nsjail.py +++ b/tests/test_nsjail.py @@ -192,7 +192,7 @@ class NsJailTests(unittest.TestCase): chunk = "a" * READ_CHUNK_SIZE expected_chunks = OUTPUT_MAX // sys.getsizeof(chunk) + 1 - nsjail_subprocess = unittest.mock.Mock() + nsjail_subprocess = unittest.mock.MagicMock() # Go 10 chunks over to make sure we exceed the limit nsjail_subprocess.stdout = io.StringIO((expected_chunks + 10) * chunk) -- cgit v1.2.3