test(dmm): verify Agilent 34401A on hardware, split software tests per vendor#134
Open
hoehner wants to merge 1 commit into
Open
test(dmm): verify Agilent 34401A on hardware, split software tests per vendor#134hoehner wants to merge 1 commit into
hoehner wants to merge 1 commit into
Conversation
…r vendor Add a self-contained hardware-validation script for the Agilent 34401A (RS-232/VISA) covering every method the driver implements, confirmed against a real unit (HEWLETT-PACKARD,34401A). Move the Agilent34401A mocked-transport tests out of test_instro_dmm.py into tests/dmm/agilent/, mirroring the per-vendor PSU test layout. INSTRO-372
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Verifies the
Agilent34401ADMM driver against a real unit and reorganizes its software tests to match the per-vendor layout used by the PSU drivers.tests/dmm/agilent/test_agilent_34401a_hardware.py): self-contained, no publishers,@pytest.mark.hardware-marked so it's deselected in CI. Exercises every method the driver implements —*IDN?, all six measurement functions (set + read),set_digits(4/5/6 + invalid-digit guard), per-function range (manual + auto), and the SCPI error-query path. Runnable standalone viauv run python tests/dmm/agilent/test_agilent_34401a_hardware.py.tests/dmm/agilent/test_agilent_34401a_software.py): moved theAgilent34401Amocked-transport tests out oftest_instro_dmm.pyinto a vendor-specific file, mirroringtests/psu/<vendor>/. No test logic changed; imports trimmed accordingly.Hardware confirmation
Run against a physical Agilent/HP 34401A over RS-232 (COM6 /
ASRL6::INSTR, 9600 baud),*IDN?→HEWLETT-PACKARD,34401A,0,11-5-2. All 11 validation steps pass with sensible open-input values (noise on V/I,9.9e37overload sentinel on resistance). No driver changes were needed — the driver was already correct.The validation script uses
visa_backend="@py"because the test machine has no NI-VISA. Note: the@ivi→@pyauto-fallback inVisaDriveris currently broken (it catchesOSErrorbut the missing-library error is apyvisa.errors.VisaIOError) — tracked separately in #133, out of scope here.Notes
@pytest.mark.hardware, so it does not run in CI (addopts = -m 'not hardware'). It is included as a record and for manual re-runs against a connected unit.uv.lockintentionally excluded — unrelated pre-existing change.test_instro_dmm.py; splitting those is deferred to a separate ticket.Test plan
just check— clean (ruff format, mypy, ruff lint).just test/uv run pytest tests/dmm/— 37 passed, 1 deselected (the hardware test). Test count unchanged across the move.