Log: v0.4.1 — Test Coverage Expansion & Multi-Python CI
Overview
A quality and reliability release filling the last unit test gaps across the driver layer and expanding CI to validate across all supported Python versions. No new features — just making sure what's already there is proven to work.
Unit Tests: Rohde & Schwarz Drivers (tests/test_rs.py)
Closes #94 — RohdeSchwarzSG and RohdeSchwarzSA now have comprehensive unit test coverage (21 tests).
RohdeSchwarzSG
preset()sends*RST, enables display-off in automation-optimized mode, and skips it when notset_frequency()andset_amplitude()produce correct SCPI command strings viaformat_frequencyandformat_powerset_output()sends:OUTP ON/:OUTP OFFset_mod_state()correctly dispatches AM, FM, PULSE, and the PULM aliasstart_sweep()sends all four SCPI parameters plus:FREQ:MODE SWEconfigure_list_sweep()serializes frequency and power lists and sets:FREQ:MODE LIST
RohdeSchwarzSA
preset()sends*RSTset_center_freq(),set_span(),set_rbw(),set_vbw()format values correctly through the base helperspeak_search()sends:CALC:MARK1:MAXget_marker_amplitude()parses the query response into aMeasurementResultwithdBmunitget_trace_data()configures:FORM REAL,32, disables continuous sweep, and returns aMeasurementResult
Unit Tests: Prologix GPIB-USB Bridge (tests/test_prologix.py)
Closes #93 — PrologixDriver now has 11 unit tests covering the full bridge initialization and command protocol.
connect()sends all four initialization commands in order:++mode 1,++auto 0,++eoi 1,++addr {n}— verified as raw strings without SCPI newline appended (Prologix++commands are exempt from the newline rule inwrite())set_gpib_address()updates the attribute and sends++addr {n}query()appends++read eoiafter the SCPI command and strips whitespace from the responsewrite()appends\nto SCPI commands, does not double-append if already present, and leaves++commands untouched
Multi-Python CI Matrix
Closes #97 — .github/workflows/main.yml now uses a strategy.matrix across Python ["3.9", "3.10", "3.11", "3.12"].
- Single-version
Set up Python 3.10step replaced withSet up Python ${{ matrix.python-version }} - All four versions run the full lint + test pipeline in parallel on every push and PR to
main
Test Count
Total: 188 tests passing across all Python versions (up from 156 before this release).