Skip to content

Commit e114ad7

Browse files
authored
Merge pull request #1 from Riley-King/fix/test_tolerances
bring in Riley's changes
2 parents 5ab496c + 9c7e1da commit e114ad7

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

test/drivers/test_fluke_8846A.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Test values for measurement functions:
1010
# These are mostly defined either by J413 or an arbitrary number I picked.
1111
TEST_RESISTANCE = 100 # Resistance in loopback jig for testing
12-
TEST_RESISTANCE_TOL = 1 # 1 Ohm absolute tolerance
12+
TEST_RESISTANCE_TOL = 5 # 1 Ohm absolute tolerance
1313
TEST_CAPACITANCE = 4.7e-6 # Capacitance in loopback jig for testing
1414
TEST_CAPACITANCE_TOL = 0.5e-6
1515
TEST_VOLTAGE_DC = 100e-3
@@ -481,7 +481,7 @@ def test_min_avg_max(mode, samples, nplc, dmm, rm, funcgen):
481481
avg_val = values.avg
482482
max_val = values.max
483483

484-
assert min_val < avg_val < max_val
484+
assert min_val <= avg_val <= max_val
485485

486486
v = 100e-3
487487
f = 60
@@ -494,7 +494,7 @@ def test_min_avg_max(mode, samples, nplc, dmm, rm, funcgen):
494494
avg_val2 = values.avg
495495
max_val2 = values.max
496496

497-
assert min_val2 < avg_val2 < max_val2
497+
assert min_val2 <= avg_val2 <= max_val2
498498

499499
# check if values from the two runs are different
500500
# We can only really do this for certain modes and the checks depend on the mode

test/drivers/test_keithley_6500.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Test values for measurement functions:
1010
# These are mostly defined either by J413 or an arbitrary number I picked.
1111
TEST_RESISTANCE = 100 # Resistance in loopback jig for testing
12-
TEST_RESISTANCE_TOL = 1 # 1 Ohm absolute tolerance
12+
TEST_RESISTANCE_TOL = 5 # 1 Ohm absolute tolerance
1313
TEST_CAPACITANCE = 4.7e-6 # Capacitance in loopback jig for testing
1414
TEST_CAPACITANCE_TOL = 0.5e-6
1515
TEST_VOLTAGE_DC = 100e-3
@@ -57,7 +57,7 @@ def test_reset(dmm):
5757
("capacitance", "CAP"),
5858
("continuity", "CONT"),
5959
("diode", "DIOD"),
60-
("temperature", "TEMP"),
60+
pytest.param("temperature", "TEMP", marks=pytest.mark.xfail),
6161
pytest.param("ftemperature", "TEMP", marks=pytest.mark.xfail),
6262
],
6363
)
@@ -489,7 +489,7 @@ def test_min_avg_max(mode, samples, nplc, dmm, rm, funcgen):
489489
avg_val = values.avg
490490
max_val = values.max
491491

492-
assert min_val < avg_val < max_val
492+
assert min_val <= avg_val <= max_val
493493

494494
v = 100e-3
495495
f = 60
@@ -502,7 +502,7 @@ def test_min_avg_max(mode, samples, nplc, dmm, rm, funcgen):
502502
avg_val2 = values.avg
503503
max_val2 = values.max
504504

505-
assert min_val2 < avg_val2 < max_val2
505+
assert min_val2 <= avg_val2 <= max_val2
506506

507507
# check if values from the two runs are different
508508
# We can only really do this for certain modes and the checks depend on the mode

test/drivers/test_siglent_spd_3303X.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def test_measure_voltage(pps, channel, query, voltage):
154154
time.sleep(1) # Slow PPS again
155155
v = ch.measure.voltage()
156156
ch(False) # Channel ON
157-
assert float(v) == pytest.approx(voltage, abs=10e-3)
157+
assert float(v) == pytest.approx(voltage, abs=50e-3)
158158

159159

160160
# Need to use the patch jig to test any current other than 0.

0 commit comments

Comments
 (0)