From: Sergey Matveev Date: Sun, 22 Mar 2020 12:24:53 +0000 (+0300) Subject: Explicitly close file descriptors to satisfy hypothesis checks X-Git-Tag: 7.4~5 X-Git-Url: http://www.git.cypherpunks.ru/?p=pyderasn.git;a=commitdiff_plain;h=2d7da5e1403e4713085b08d109b932490f0b5d63 Explicitly close file descriptors to satisfy hypothesis checks --- diff --git a/tests/test_cms.py b/tests/test_cms.py index 51bdaf1..9ce038b 100644 --- a/tests/test_cms.py +++ b/tests/test_cms.py @@ -294,6 +294,7 @@ class TestSignedDataCERWithOpenSSL(TestCase): buf = BytesIO() agg_octet_string(evgens, ("encapContentInfo", "eContent"), raw, buf.write) self.assertSequenceEqual(buf.getvalue(), data) + fd.close() def create_huge_file(self): rnd = urandom(1<<20) @@ -382,6 +383,7 @@ class TestSignedDataCERWithOpenSSL(TestCase): ci.encode_cer(fd.write) print("CMS written", time() - start) self.verify(cert_path, cms_path) + eci_fd.close() @skipIf(PY2, "no mmaped memoryview support in PY2") @skipIf("PYDERASN_TEST_CMS_HUGE" not in environ, "PYDERASN_TEST_CMS_HUGE is not set")