feat(test): recursive test discovery + subfolder selection#1218
Open
briacbln wants to merge 1 commit into
Open
feat(test): recursive test discovery + subfolder selection#1218briacbln wants to merge 1 commit into
briacbln wants to merge 1 commit into
Conversation
Contributor
|
This PR was auto-closed. Only contributors approved with Maintainers review auto-closed issues daily. Issues that do not meet the quality bar in CONTRIBUTING.md will not be reopened or receive a reply. If a maintainer replies See CONTRIBUTING.md. |
briacbln
force-pushed
the
feat/recursive-test-discovery
branch
2 times, most recently
from
July 21, 2026 06:08
eb92855 to
356d0bc
Compare
Closes getnao#935. discover_tests now recurses into tests/ subfolders (was top-level only, silently skipping nested files). filter_test_cases accepts an optional tests_dir to select a whole subfolder via -s/--select (e.g. `nao test -s contracts`). Backward compatible: two-arg calls and flat layouts unchanged. Excludes tests/outputs/ from discovery. Signed-off-by: briacbln <briac.belin@gmail.com>
briacbln
force-pushed
the
feat/recursive-test-discovery
branch
from
July 21, 2026 10:24
356d0bc to
2514298
Compare
Bl3f
approved these changes
Jul 21, 2026
Bl3f
left a comment
Contributor
There was a problem hiding this comment.
LGTM, ty for this first contribution, welcome to the nao community!
Contributor
|
(tho you have Ruff failing) |
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.
Closes #935
What
discover_testsrecurses intotests/subfolders viarglob(was top-levelglob, silently skipping nested files)filter_test_casesgains an optionaltests_dirparam, letting-s/--selectscope to a whole subfolder (e.g.nao test -s contractsruns all oftests/contracts/) in addition to the existing name/stem selectiontests/outputs/is excluded from discoveryWhy
With tests organized under
tests/contracts/,tests/segments/, etc.,nao testreported "Found 1 test(s)" with no warning — nested files were silently ignored.Compatibility
filter_test_casescalls unchanged (tests_dirdefaults toNone)tests/layouts behave exactly as beforeoutputs/exclusionDesign note
Folder match takes precedence over name match in
filter_test_cases. In practice folder and test names don't collide; happy to invert or raise on ambiguity if preferred.