refactor: reorganize tests into domain-grouped subdirectories#70
Closed
nightmare0329 wants to merge 1 commit intoentrius:testfrom
Closed
refactor: reorganize tests into domain-grouped subdirectories#70nightmare0329 wants to merge 1 commit intoentrius:testfrom
nightmare0329 wants to merge 1 commit intoentrius:testfrom
Conversation
Restructures the flat tests/ layout into subdirectories mirroring the
source tree, making it easier to locate tests for a given module:
tests/core/ — SCALE codec, chain registry, commitments, rate math
tests/chain_providers/ — Bitcoin signing and address validation
tests/validator/ — axon handlers, event watcher, scoring, state store,
poll commitments, swap tracker
tests/miner/ — swap fulfillment
Extracts shared factories into tests/helpers.py to eliminate duplication:
- make_swap: unified Swap factory previously copied across
test_swap_tracker.py and test_fulfillment.py
- METADATA_PATH: shared path constant previously duplicated in
test_scoring_v1.py and test_event_watcher.py
All 291 passing tests continue to pass. The 9 pre-existing failures in
test_axon_handlers.py are unchanged.
Closes entrius#24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restructures the flat
tests/layout into subdirectories mirroring the source tree, making it easier to locate tests for a given module.New layout:
Shared helpers extracted into
tests/helpers.py:make_swap: unified Swap factory previously duplicated acrosstest_swap_tracker.pyandtest_fulfillment.pyMETADATA_PATH: shared path constant previously duplicated intest_scoring_v1.pyandtest_event_watcher.pyRelated Issues
Closes #24
Type of Change
Testing
test_axon_handlers.pyare unchangedChecklist