mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-10-19 02:51:42 -07:00
setup.focus: the tube-current case plants a reading at HV_ON, so it holds the threshold
test_a_burn_whose_tube_current_the_test_never_saw_rise_fails planted pic/hv_current at 0. That proved the check on the test's own reads exists, but not its threshold: the check written as `> 0`, or as `>= HV_ON`, passed every case. The case now plants HV_ON itself (30, which is not over 30), so with the 431 the passing cases plant, the threshold is held between 30 and 430. setup_burns.py does not change. Proof: tests/test_setup_burns.py, the Unit tests step of forgetest-ci.yml (python -B -m unittest discover -s tests), 24 tests OK on Windows with python 3.14 and on Ubuntu 24.04 with python 3.12. Negative controls on scratch copies: the check as `> 0`, as `>= HV_ON`, and as no check at all each fail the case (Failed not raised); the case as it was (a plant of 0) passes against the `> 0` check. pyflakes reports no undefined name. Acceptance: none. tests/ are in no fingerprint (source_sha of 43 of 43 unchanged).
This commit is contained in:
@@ -533,8 +533,9 @@ class BurnRunTests(unittest.TestCase):
|
|||||||
|
|
||||||
def test_a_burn_whose_tube_current_the_test_never_saw_rise_fails(self):
|
def test_a_burn_whose_tube_current_the_test_never_saw_rise_fails(self):
|
||||||
# The LASER_ON count read nonzero from here, and the tube current
|
# The LASER_ON count read nonzero from here, and the tube current
|
||||||
# never left zero: the second witness is judged on its own reads.
|
# never read over HV_ON: the second witness is judged on its own
|
||||||
self.plant("pic/hv_current", "0")
|
# reads, against the daemon's own threshold for a lit burn.
|
||||||
|
self.plant("pic/hv_current", str(setup_burns.HV_ON))
|
||||||
with self.assertRaises(Failed) as cm:
|
with self.assertRaises(Failed) as cm:
|
||||||
self.run_test("setup.focus")
|
self.run_test("setup.focus")
|
||||||
self.assertIn("tube current never read over %d from here" % setup_burns.HV_ON, str(cm.exception))
|
self.assertIn("tube current never read over %d from here" % setup_burns.HV_ON, str(cm.exception))
|
||||||
|
|||||||
Reference in New Issue
Block a user