Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
"""Tests for src/pygui/backend/data_records.py."""
|
||||
from pygui.backend.data_records import read_data_records
|
||||
|
||||
|
||||
def test_reads_rows_after_data_marker(tmp_path):
|
||||
p = tmp_path / "s.csv"
|
||||
p.write_text(
|
||||
"Wafer ID=A12\n"
|
||||
"Label,1,2\nX (mm),0,10\nY (mm),10,-10\n"
|
||||
"data\n"
|
||||
"0.0,149.0,148.5\n"
|
||||
"0.5,149.2,148.4\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
recs = read_data_records(str(p))
|
||||
assert len(recs) == 2
|
||||
assert recs[0].time == 0.0
|
||||
assert recs[0].values == [149.0, 148.5]
|
||||
assert recs[1].values == [149.2, 148.4]
|
||||
Reference in New Issue
Block a user