Skip to content

Fix skipping tests with run ignored#673

Closed
OmChillure wants to merge 1 commit intokarva-dev:mainfrom
OmChillure:fix-skipped-tests-with-run-ignored
Closed

Fix skipping tests with run ignored#673
OmChillure wants to merge 1 commit intokarva-dev:mainfrom
OmChillure:fix-skipped-tests-with-run-ignored

Conversation

@OmChillure
Copy link
Copy Markdown

@OmChillure OmChillure commented Apr 12, 2026

Fixes #548

Summary

This PR adds run-ignored support through filter expressions and fixes skip-handling behavior so existing filter semantics stay correct.

You can now run:


-E "runignored(only)" to run only skipped tests
-E "runignored(all)" to run skipped + normal tests

###What Changed

  • Added a new filter predicate: [runignored(mode)], with supported modes:
only
all
  • Extended filter evaluation context to track whether a test has a skip decorator.
  • Updated runner skip logic so skip decorators are only overridden when runignored(...) is explicitly used.
  • Preserved prior behavior for regular filters like [tag(...)].

Added integration coverage for:

  • runignored(only)
  • runignored(all)
  • No-skipped-tests behavior under runignored(only)
  • Conditional skip behavior (skipif(False, ...))
  • Updated filter error snapshot text to include runignored in expected predicate list.

Behavior

  • Without runignored(...): skipped tests remain skipped.
  • With runignored(only): only skipped tests execute.
  • With runignored(all): skipped and non-skipped tests execute together.

Validation

  • Ran integration tests and resolved snapshot mismatches.
  • Verified targeted runs for both modes with expected outcomes.

Screenshots

Before
Screenshot from 2026-04-12 09-47-45

runignored(only)
Screenshot from 2026-04-12 09-47-51

runignored(all)
Screenshot from 2026-04-12 09-48-01

Notes

This PR introduces run-ignored behavior via filter expressions (-E ...).
A dedicated CLI flag like [--run-ignored {only|all}] is not introduced in this change.

@MatthewMckee4
Copy link
Copy Markdown
Member

Thanks! I think I would prefer to do what nextest does here:

      --run-ignored <WHICH>
          Run ignored tests
          - default: Run non-ignored tests
          - only:    Run ignored tests
          - all:     Run both ignored and non-ignored tests

@MatthewMckee4
Copy link
Copy Markdown
Member

Also, @OmChillure feel free to join the discord if you want to chat more about issues etc.

@OmChillure
Copy link
Copy Markdown
Author

Thanks! I think I would prefer to do what nextest does here:

      --run-ignored <WHICH>
          Run ignored tests
          - default: Run non-ignored tests
          - only:    Run ignored tests
          - all:     Run both ignored and non-ignored tests

ahh damn, btw I have the chagnes that already does this, should I raise a new PR or is it fine If i add those commit here in this one?

@OmChillure
Copy link
Copy Markdown
Author

Also, @OmChillure feel free to join the discord if you want to chat more about issues etc.

yeah sure

@MatthewMckee4
Copy link
Copy Markdown
Member

@OmChillure whatever is easier for you, maybe make a new PR if you have the changes on a different branch already

@OmChillure
Copy link
Copy Markdown
Author

OmChillure commented Apr 12, 2026

@OmChillure whatever is easier for you, maybe make a new PR if you have the changes on a different branch already

Did it at #674

and closing this !!

@OmChillure OmChillure closed this Apr 12, 2026
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.

Run skipped/ignored tests with --run-ignored

2 participants