Skip to content

test: add coverage for tailor, eventful, hotkeys, dig, stockpiles - #5931

Open
Alistair-Afton wants to merge 1 commit into
DFHack:developfrom
Alistair-Afton:test-plugin-coverage-4
Open

Alistair-Afton wants to merge 1 commit into
DFHack:developfrom
Alistair-Afton:test-plugin-coverage-4

Conversation

@Alistair-Afton

Copy link
Copy Markdown
Contributor

Summary

  • Add in-engine regression tests for tailor (confiscate/dye toggles, material ordering), eventful (reaction/sidebar registration and dispatch), hotkeys (Armok filtering, binding discovery, internal menu filtering), dig (digcircle designations, cursor handling), and stockpiles (status, filename validation, export/import round trip)
  • Fix eventful world-unload cleanup: it unhooked onReactionComplete (never bound by the module) instead of onReactionCompleting (bound by registerReaction), and never unhooked onWorkshopFillSidebarMenu (bound by registerSidebar). Registered callbacks leaked across world loads and could fire against stale state — the new world_unload_clears_registration test catches this
  • Tests avoid digcircle's "do it again" static argument memory by always passing set/unset explicitly

Test plan

  • Full in-engine suite green: 300/300 tests, 5144/5144 checks (Windows, DF 53.16)
  • ci/lint.py clean on all touched files

@Alistair-Afton
Alistair-Afton force-pushed the test-plugin-coverage-4 branch 2 times, most recently from 494f2eb to c94454c Compare September 17, 2026 15:12
Also fixes eventful's world-unload cleanup unhooking the wrong events:
it cleared onReactionComplete (never bound) instead of
onReactionCompleting (bound by registerReaction), and never cleared
onWorkshopFillSidebarMenu (bound by registerSidebar). Registered hooks
leaked into subsequently loaded worlds and could fire against stale
state.
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.

1 participant