diff options
author | Julian Berman <Julian@GrayVines.com> | 2022-08-06 17:45:51 +0300 |
---|---|---|
committer | Julian Berman <Julian@GrayVines.com> | 2022-08-06 18:03:17 +0300 |
commit | 29949ae686c517652b0694c8a8124dfe32bfd4f1 (patch) | |
tree | 5d984c58b1277e4a5b4fd893271e42a7a52b98af | |
parent | f241ee5c04b6c20cedd27090b9c7312831598d3a (diff) | |
download | jsonschema-29949ae686c517652b0694c8a8124dfe32bfd4f1.tar.gz |
Close the tempfile for PyPy+Windows.
Otherwise there's no guarantee it's closed by the time we try
to os.remove, and Windows doesn't like that very much.
-rw-r--r-- | jsonschema/tests/test_cli.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/jsonschema/tests/test_cli.py b/jsonschema/tests/test_cli.py index 6d42af6..b0e08c4 100644 --- a/jsonschema/tests/test_cli.py +++ b/jsonschema/tests/test_cli.py @@ -697,6 +697,7 @@ class TestCLI(TestCase): def test_successful_validation_via_explicit_base_uri(self): ref_schema_file = tempfile.NamedTemporaryFile(delete=False) + ref_schema_file.close() self.addCleanup(os.remove, ref_schema_file.name) ref_path = Path(ref_schema_file.name) @@ -717,6 +718,7 @@ class TestCLI(TestCase): def test_unsuccessful_validation_via_explicit_base_uri(self): ref_schema_file = tempfile.NamedTemporaryFile(delete=False) + ref_schema_file.close() self.addCleanup(os.remove, ref_schema_file.name) ref_path = Path(ref_schema_file.name) |