Skip to content

test(dmm): verify Agilent 34401A on hardware, split software tests per vendor#134

Open
hoehner wants to merge 1 commit into
mainfrom
instro-372-verify-agilent-34401a
Open

test(dmm): verify Agilent 34401A on hardware, split software tests per vendor#134
hoehner wants to merge 1 commit into
mainfrom
instro-372-verify-agilent-34401a

Conversation

@hoehner

@hoehner hoehner commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

What

Verifies the Agilent34401A DMM driver against a real unit and reorganizes its software tests to match the per-vendor layout used by the PSU drivers.

  • Hardware validation script (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 via uv run python tests/dmm/agilent/test_agilent_34401a_hardware.py.
  • Per-vendor software tests (tests/dmm/agilent/test_agilent_34401a_software.py): moved the Agilent34401A mocked-transport tests out of test_instro_dmm.py into a vendor-specific file, mirroring tests/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.9e37 overload 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@py auto-fallback in VisaDriver is currently broken (it catches OSError but the missing-library error is a pyvisa.errors.VisaIOError) — tracked separately in #133, out of scope here.

Notes

  • The hardware test is @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.lock intentionally excluded — unrelated pre-existing change.
  • Keithley2400 software tests remain in 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.

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant