diff --git a/test/test_fetch.py b/test/test_fetch.py index fcf51f1..2bc2984 100644 --- a/test/test_fetch.py +++ b/test/test_fetch.py @@ -14,10 +14,8 @@ @pytest.fixture(scope="session") def test_crates(tmp_path_factory): test_dir = tmp_path_factory.mktemp("crates") - with open(test_dir / "foo-1.crate", "wb") as f: - f.write(b"test string\n") - with open(test_dir / "bar-2.crate", "wb") as f: - f.write(b"other string\n") + (test_dir / "foo-1.crate").write_bytes(b"test string\n") + (test_dir / "bar-2.crate").write_bytes(b"other string\n") yield test_dir