Test RawFile.resolve_index -- exact match, case-insensitivity, no partial
Locks in the exact-match semantics that distinguish resolve_index from get_variable, so the lookup used by tune_circuit and plot_waveform is now covered without needing the live LTspice path.
This commit is contained in:
parent
d177a8a316
commit
7c4f09cbb3
@ -69,6 +69,22 @@ class TestRawFileGetVariable:
|
||||
assert len(result) == mock_rawfile.points
|
||||
|
||||
|
||||
class TestRawFileResolveIndex:
|
||||
def test_exact_match_returns_index(self, mock_rawfile):
|
||||
assert mock_rawfile.resolve_index("V(out)") == 1
|
||||
assert mock_rawfile.resolve_index("time") == 0
|
||||
|
||||
def test_case_insensitive(self, mock_rawfile):
|
||||
assert mock_rawfile.resolve_index("v(out)") == 1
|
||||
|
||||
def test_partial_does_not_match(self, mock_rawfile):
|
||||
"""Unlike get_variable, resolve_index requires an exact name match."""
|
||||
assert mock_rawfile.resolve_index("out") is None
|
||||
|
||||
def test_missing_returns_none(self, mock_rawfile):
|
||||
assert mock_rawfile.resolve_index("V(nonexistent)") is None
|
||||
|
||||
|
||||
class TestRawFileRunData:
|
||||
def test_get_run_data_slicing(self, mock_rawfile_stepped):
|
||||
"""Extracting a single run produces correct point count."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user