From 027d3d74b0bfdd821defa16a6ac6bf14bf2bdcc4 Mon Sep 17 00:00:00 2001 From: Philip Mueller Date: Mon, 17 Jun 2024 08:37:33 +0200 Subject: [PATCH] Let's see if this works. --- tests/test_package.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_package.py b/tests/test_package.py index 987f74a..f5f77ca 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -31,14 +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()) + def my_read(F): + 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) + F.seek(0) + my_read(F) def test_temp_file2():