]> Cypherpunks.ru repositories - pyderasn.git/blobdiff - tests/test_cms.py
Explicitly close file descriptors to satisfy hypothesis checks
[pyderasn.git] / tests / test_cms.py
index 51bdaf1cbf26adb3d2843d9481d8c36766032eb3..9ce038b99e73f9168c38514252b28b4f314357b5 100644 (file)
@@ -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")