Skip to content

Commit 2330e8f

Browse files
committed
Precommit
1 parent b3cb37a commit 2330e8f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/integration/test_segy_import_export_masked.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,6 @@ def raw_headers_env(request: pytest.FixtureRequest) -> None:
309309
os.environ.pop("MDIO__DO_RAW_HEADERS", None)
310310

311311
# Clean up any template modifications to ensure test isolation
312-
from mdio.builder.template_registry import TemplateRegistry
313-
314312
registry = TemplateRegistry.get_instance()
315313

316314
# Reset any templates that might have been modified with raw headers
@@ -543,7 +541,8 @@ def test_raw_headers_byte_preservation(
543541
# Read raw bytes directly from SEG-Y file
544542
def read_segy_trace_header(trace_index: int) -> bytes:
545543
"""Read 240-byte trace header directly from SEG-Y file."""
546-
with open(segy_path, "rb") as f:
544+
# with open(segy_path, "rb") as f:
545+
with Path.open(segy_path, "rb") as f:
547546
# Skip text (3200) + binary (400) headers = 3600 bytes
548547
f.seek(3600)
549548
# Each trace: 240 byte header + (num_samples * 4) byte samples
@@ -557,7 +556,7 @@ def read_segy_trace_header(trace_index: int) -> bytes:
557556
flat_mask = trace_mask.ravel()
558557
flat_raw_headers = raw_headers_data.ravel() # Flatten to 1D array of 240-byte header records
559558

560-
operation = "w"
559+
# operation = "w"
561560

562561
for grid_idx in range(flat_mask.size):
563562
if not flat_mask[grid_idx]:

0 commit comments

Comments
 (0)