diff --git a/tests/test_package.py b/tests/test_package.py index 92ac631..987f74a 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -31,9 +31,14 @@ def test_temp_folder(): def test_temp_file(): + def my_read(path): + with open(path) as F: # noqa: PTH123 PLW1514 + print(F.readlines()) + with tempfile.NamedTemporaryFile(mode="wt") as F: # noqa: PLW1514 print("created temporary file", F.name) F.write("Hello world.") + my_read(F.name) def test_temp_file2():