forgetest tests: the confirmed trims of the tool's own unit tests

The cases that tested a mock, a timer, a wording or a table, or that
replayed a judgment a host test already holds, leave forgetest/tests.
What catches a false PASS, keeps the bench safe, or guards the gate
stays.

- test_baseline: the fake sysfs tree is a mixin with no test_ methods,
  so ExtensionFreeTests and BaselineModeTests no longer re-run
  BaselineTests' 25 cases (133 runs, now 45). CoolPublishTests, the
  lamp-fade cases and TransientNotLeftoverTests go; PositionDeadbandTests
  keeps a reading past the band and an unreadable reading, both never
  excused. Both latch-relock cases stay.
- test_fixture: MdnsTests, the three timing cases, the probe's log
  wording, and nine prompt-routing variants go. A live test never runs
  unattended, the arm-press opt-in, the short-press edge, the presence
  press handing over the arm press, and the arm notice dropping at the
  press stay (35 cases, now 21).
- test_cloud_suite: three false-PASS guards stay: the latch open at a
  dark print's button, a lid stop that is not edge-driven, the kernel
  refusing the resume. The guards for the latch unlocking in the hold
  and a paused print resuming left with their catalog tests in 6a434bb.
  The rest go, with the harness pieces and the hunt-lid fixture only
  they read (41 cases, now 3).
- test_cooling_suite: GateOffTests, CriticalTierTests, FanGateTests and
  FansQuietTests go with their harness; the flow verdict's log reads
  stay: only the text after the offset, never an older verdict before it
  (the flow-under-load false-PASS guard), a rotated log read whole.
- test_queue: RunClockTests and three ordering cases go, and refusals
  are judged by a reason given, not its words; both live
  acknowledgment cases stay.
- test_takeover_position: the six cases that judge the head and move
  nothing stay.
- test_camera_home_return: the five cases where the head must not move
  stay, and so do the three that check the hand-back jog's direction and
  distance (homed, unhomed with the counters not counted twice, after
  cloud mode): a wrong sign or a double count drives the head into the
  gantry stops (15 cases, now 8).
- test_server: the keep-alive and ETag cases, the takeover and scope
  half of the bench case, and the page's self-contained asserts
  (test_page.py's) go.
- test_operator: the wording cases, the fixture case (test_fixture.py's)
  and JournalTests go.
- test_mode: the supervisor timeout table goes.
- test_takeover_client: the listener, the offline service back, the
  online client without the hunt, and GRBL under no marker stay.
- test_responsiveness: PageTests and ImplementationCostTests go; the
  log cache keeps appends, a partial line, a replaced file and a fresh
  list, and the fingerprint cache a changed manifest and one with no
  content hash.
- test_bench_registry: GfbenchTests and two description and argument
  pins go.
- test_installer: the log-format and TLS-wording cases and
  InstallerShapeTests go; the die case checks the reason is in the log,
  not its format.
- test_image: KernelIdentTests and the registration pin go.

Each file's __main__ guard now ends the file, and the docstrings say what
each still proves.

Proof: each of the fifteen files passes under Linux as forgetest-ci
discovers it, and pyflakes reports nothing new in them.

Acceptance: none; test-only.
This commit is contained in:
ScottW514
2026-10-13 20:29:25 -04:00
parent 8536ae7076
commit 520d62ac05
16 changed files with 78 additions and 2848 deletions
-54
View File
@@ -136,49 +136,6 @@ class TakeoverPositionTests(unittest.TestCase):
self.start(t)
self.assertNotIn("restart_positions", cap)
def test_an_undeclared_frame_change_is_not_judged(self):
cap = self.cap()
self._new_anchor(2) # a controller start the test did not declare
self._pos(self.mm(10), 0, 0)
t, run = self.takeover(cap)
self.start(t)
self.assertNotIn("restart_positions", cap)
self.assertTrue(any("not in the frame the run began in" in l for l in run.lines), run.lines)
def test_cloud_mode_is_not_judged(self):
cap = self.cap()
self._pos(self.mm(10), 0, 0)
t, run = self.takeover(cap)
t.cloud = True
t.position_at_start()
self._pos(self.mm(20), 0, 0)
t.position_at_end()
self.assertNotIn("restart_positions", cap)
def test_a_bench_tool_is_not_judged(self):
t = runner.Takeover(lambda s: None, "bench:tool")
self._pos(self.mm(10), 0, 0)
t.position_at_start()
t.position_at_end() # no run: nothing to judge against, nothing raised
def test_a_drill_that_leaves_the_head_out_is_recorded_at_the_end(self):
cap = self.cap()
t, run = self.takeover(cap)
self.start(t)
self._pos(self.mm(5), 0, 0) # the drill moved the head and did not bring it back
t.position_at_end()
self.assertEqual([r["where"] for r in cap["restart_positions"]], ["takeover end"])
self.assertEqual(cap["restart_positions"][0]["expected"], [0, 0, 0])
def test_a_changed_microstep_mode_is_not_judged_at_the_end(self):
cap = self.cap()
t, run = self.takeover(cap)
self.start(t)
self._attr("cnc/x_mode", "8" if hw.sysfs_read("cnc/x_mode") != "8" else "16")
self._pos(self.mm(5), 0, 0)
t.position_at_end()
self.assertNotIn("restart_positions", cap)
def test_the_post_pass_fails_the_run_and_moves_nothing(self):
# setup.check-envelope's case: a declared camera home, the head
# left out, the record put back under a takeover, whose restart
@@ -228,17 +185,6 @@ class TakeoverPositionTests(unittest.TestCase):
self.assertEqual(f.read().strip(), "1")
self.assertTrue(any("could not be judged" in l for l in run.lines), run.lines)
def test_a_declared_rezero_records_the_frame_in_force(self):
cap = self.cap()
self._new_anchor(5) # the camera home
stub = type("Ctx", (), {})()
stub.run = FakeRun(cap)
stub.log = stub.run.log
runner.Context.counters_rezeroed(stub)
self.assertEqual(cap["position"], [0, 0, 0])
self.assertTrue(cap["rezero_declared"])
self.assertEqual(cap["frame"], baseline.counter_frame())
if __name__ == "__main__":
unittest.main()