Skip to content

Fixing issues in driver tests#232

Closed
Riley-King wants to merge 3 commits intoPyFixate:mainfrom
Riley-King:fix/test_tolerances
Closed

Fixing issues in driver tests#232
Riley-King wants to merge 3 commits intoPyFixate:mainfrom
Riley-King:fix/test_tolerances

Conversation

@Riley-King
Copy link
Contributor

Changed resistance tolerances in keithley 6500 and fluke 8846A tests from 1 ohm to 5 to account for the fact that it is measuring a 100 ohm resistor, fixing it complaining that it got 102 ohms on a two-wire measurement when it expected 100.

Fixed handling of floating-point measurements in keithley 6500 and fluke 8846A tests, changing min < avg < max to min <= avg <= max.

Marked temperature test in keithley 6500 as xfail. This is to preserve consistency with the fluke 8846A tests as well as eliminate testing a feature that is not used nor supported.

Changed tolerance in Siglent SPD3303X driver voltage test from 10 mV to 50 mV as that is the limit of the devices precision as guaranteed by Siglent anyway.

@daniel-montanari daniel-montanari mentioned this pull request Sep 19, 2025
8 tasks
max_val = values.max

assert min_val < avg_val < max_val
assert min_val <= avg_val <= max_val
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case we want to check that all three values are not the same. We're measuring a sine wave, if the min and max values are the same then something has gone wrong.

max_val2 = values.max

assert min_val2 < avg_val2 < max_val2
assert min_val2 <= avg_val2 <= max_val2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

max_val = values.max

assert min_val < avg_val < max_val
assert min_val <= avg_val <= max_val
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as the with the fluke we want to check that the values are different

max_val2 = values.max

assert min_val2 < avg_val2 < max_val2
assert min_val2 <= avg_val2 <= max_val2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

# These are mostly defined either by J413 or an arbitrary number I picked.
TEST_RESISTANCE = 100 # Resistance in loopback jig for testing
TEST_RESISTANCE_TOL = 1 # 1 Ohm absolute tolerance
TEST_RESISTANCE_TOL = 5 # 1 Ohm absolute tolerance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update comment

# These are mostly defined either by J413 or an arbitrary number I picked.
TEST_RESISTANCE = 100 # Resistance in loopback jig for testing
TEST_RESISTANCE_TOL = 1 # 1 Ohm absolute tolerance
TEST_RESISTANCE_TOL = 5 # 1 Ohm absolute tolerance
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update comment

@jcollins1983
Copy link
Collaborator

Because this is in a fork that we don't have access to, this work will continue in #246

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.

3 participants