We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc52c3a commit ef2e8b5Copy full SHA for ef2e8b5
1 file changed
tests/eitdata/test_loading_draeger.py
@@ -1,3 +1,4 @@
1
+import sys
2
import tempfile
3
from pathlib import Path
4
@@ -182,7 +183,8 @@ def test_event_on_first_frame(draeger_20hz_healthy_volunteer: Sequence):
182
183
frame_size = _bin_file_formats["pressure_pod"]["frame_size"]
184
ignore_bytes = event_index * frame_size # number of bytes to ignore at start of file
185
- with tempfile.NamedTemporaryFile(delete_on_close=False) as temporary_file:
186
+ kwargs = {"delete_on_close": False} if sys.version_info >= (3, 12) else {}
187
+ with tempfile.NamedTemporaryFile(**kwargs) as temporary_file:
188
# Create a temporary file, that is removed after the context manager is closed
189
tempfile_path = Path(temporary_file.name)
190
with draeger_20hz_healthy_volunteer.eit_data["raw"].path.open("rb") as original_file:
0 commit comments