Commit 8b2bbd5
Skip LabJack hardware tests when the exodriver library is absent
TestLabjackDevice.setUp only skipped when initializeDevice() raised
u3.LabJackException ("library installed, no device attached"). On a host
that has LabJackPython but not the native exodriver shared library, the
call instead raises AttributeError ('NoneType' object has no attribute
'LJUSB_OpenDevice', because LabJackPython's staticLib is None). That was
not caught, so all 21 real-hardware tests failed instead of skipping.
This surfaced once CI started running the suite: LabJackPython installs as
a declared dependency, but the exodriver native library is not present on
the runners, so every matrix job went red.
Broaden the skip guard to treat AttributeError as another "no hardware"
signature, honouring the project rule that hardware tests must skipTest()
when no device is attached rather than fail. Unexpected causes still
re-raise. No change in behaviour where a real LabJack is connected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 680f618 commit 8b2bbd5
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
0 commit comments