Skip to content

feat: implement ignoring tests#21

Merged
JonathanBrouwer merged 3 commits intobinary-banter:mainfrom
CommanderStorm:ignore-reasons
Feb 15, 2026
Merged

feat: implement ignoring tests#21
JonathanBrouwer merged 3 commits intobinary-banter:mainfrom
CommanderStorm:ignore-reasons

Conversation

@CommanderStorm
Copy link
Contributor

@CommanderStorm CommanderStorm commented Feb 15, 2026

This PR implements the following syntax:

test_each_path! { 
    #[cfg(feature = "integration")]
    for ["in", "out"] 
    in "./tests/integration" 
    as integration
    => test 
    ignore {
        "slow" => "Load tests, ignored for taking two hours",
        "external" => "Requires external services"
    }
}

Resolves #20

CC @nyurik

Comment on lines +188 to +189
children: BTreeMap<PathBuf, Tree>,
here: BTreeSet<PathBuf>,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only non-obvious change.
Without this, we are iterating in random order and there might be a case (which is why generate_name) exists that we need to reasign the testcase name.

This changes this to a deterministic sorting.

@JonathanBrouwer
Copy link
Contributor

CI seems to be failing, could you run rustfmt?

@JonathanBrouwer
Copy link
Contributor

This PR also makes the "the syntax of this macro is horrible" problem worse but I'm willing to accept that :)
I should get to implementing #13 sometime
Thanks for the nice PR

@CommanderStorm
Copy link
Contributor Author

Shure, I also fixed a bug that I caused in my final cleanup before opening the PR ^^

The change can be seen to work here:

@JonathanBrouwer JonathanBrouwer merged commit c0a9fda into binary-banter:main Feb 15, 2026
1 check passed
@JonathanBrouwer
Copy link
Contributor

JonathanBrouwer commented Feb 15, 2026

I'll make a new release later today :)
Thanks!

@JonathanBrouwer
Copy link
Contributor

Release has been made, was a day late but oops

@CommanderStorm
Copy link
Contributor Author

you are amazing 🥇

@CommanderStorm CommanderStorm deleted the ignore-reasons branch February 16, 2026 20:05
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.

Ability to ignore tests

2 participants

Comments