Skip to content

Conversation

@IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Jan 4, 2026

Add support for broken=, skip=, and context= keyword arguments to additional test macros for consistency with @test.

  • @test_throws: now supports broken/skip/context keywords
  • @test_warn/@test_nowarn: now supports broken/skip keywords
  • @test_logs: now supports broken/skip keywords
  • @test_deprecated: now supports broken/skip keywords

Extract common keyword parsing into extract_broken_skip_kws helper function to reduce code duplication.

Developed with Claude

@IanButterworth IanButterworth added the testsystem The unit testing framework and Test stdlib label Jan 4, 2026
@IanButterworth IanButterworth force-pushed the ib/test_args branch 2 times, most recently from dd2f606 to b244521 Compare January 5, 2026 02:46
IanButterworth and others added 2 commits January 5, 2026 14:15
…test_nowarn, @test_logs, @test_deprecated

Add support for broken=, skip=, and context= keyword arguments to
additional test macros for consistency with @test.

- @test_throws: now supports broken/skip/context keywords
- @test_warn/@test_nowarn: now supports broken/skip keywords
- @test_logs: now supports broken/skip keywords
- @test_deprecated: now supports broken/skip keywords

Extract common keyword parsing into extract_broken_skip_kws helper
function to reduce code duplication.

Co-Authored-By: Claude <noreply@anthropic.com>
Extract common exception-matching logic from do_test_throws and
do_broken_test_throws into a shared check_exception_match helper function.
This eliminates ~80 lines of duplicated code and ensures both functions
use identical matching logic including all edge cases (LoadError deprecation,
FieldError deprecation, UndefVarError scope handling, etc.).
@IanButterworth
Copy link
Member Author

@giordano would you mind reviewing given #39322

@IanButterworth IanButterworth merged commit e00a52a into JuliaLang:master Jan 7, 2026
9 checks passed
@IanButterworth IanButterworth deleted the ib/test_args branch January 7, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testsystem The unit testing framework and Test stdlib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants