Skip to content

Replace SafeTestSets with TestItemRunner#57

Open
SouthEndMusic wants to merge 13 commits into
mainfrom
use_testitemrunner
Open

Replace SafeTestSets with TestItemRunner#57
SouthEndMusic wants to merge 13 commits into
mainfrom
use_testitemrunner

Conversation

@SouthEndMusic

Copy link
Copy Markdown
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the test harness from SafeTestsets to TestItemRunner, reorganizing test suites into @testitem blocks and extracting shared helper code into a new test/utils.jl.

Changes:

  • Replaced SafeTestsets-based runtests.jl execution with TestItemRunner.@run_package_tests plus GROUP-based filtering.
  • Converted test files from @testset-driven includes to @testitem structure.
  • Added test/utils.jl to share common helper functions used across test items.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
test/runtests.jl Switches test entrypoint to TestItemRunner with GROUP-based filters.
test/utils.jl New shared test helpers for interpolation + Symbolics-related tests.
test/test_interpolations.jl Converted interpolation tests to @testitem and now includes shared helpers.
test/test_derivatives.jl Converted derivative tests to a @testitem suite.
test/test_datainterpolations_comparison.jl Converted comparison tests to @testitem.
test/test_symbolics_ext.jl Converted Symbolics extension tests to @testitem, now using shared helpers.
test/test_interface.jl Wraps interface test groups in @testitems and normalizes keyword formatting.
Project.toml Removes SafeTestsets and adds TestItemRunner to test dependencies/compat.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/test_interpolations.jl Outdated
Comment on lines +45 to +50
test_globally_constant(
BSplineInterpolationDimension; args1 = (3,), args2 = (1,),
kwargs1 = (:max_derivative_order_eval => 1,),
kwargs2 = (:max_derivative_order_eval => 1,),
cache = NURBSWeights(rand(7, 5)),
test_derivatives = false
BSplineInterpolationDimension; args1=(3,), args2=(1,),
kwargs1=(:max_derivative_order_eval => 1,),
kwargs2=(:max_derivative_order_eval => 1,),
cache=NURBSWeights(rand(7, 5)),
test_derivatives=false

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

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

This test now uses rand(7, 5) to construct NURBSWeights without setting a seed, which makes the test nondeterministic and can complicate reproducing failures. Consider seeding RNG inside this test item (or using fixed weights) so the inputs are stable run-to-run.

Copilot uses AI. Check for mistakes.
Comment thread test/utils.jl Outdated
Comment on lines +1 to +6
using Random
using ForwardDiff
using DataInterpolationsND: AbstractInterpolationDimension, EmptyCache
using Symbolics
import SymbolicUtils as SU
using Symbolics: unwrap

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

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

utils.jl is included by core interpolation tests, but it unconditionally loads Symbolics/SymbolicUtils and ForwardDiff. This increases test startup/compilation time for core tests and couples unrelated test dependencies. Consider splitting this file (e.g., interpolation utilities vs. Symbolics utilities) or moving the Symbolics-related imports/helpers into a Symbolics-only helper that is only included from test_symbolics_ext.jl.

Copilot uses AI. Check for mistakes.
Comment thread test/utils.jl Outdated
@@ -0,0 +1,90 @@
using Random
using ForwardDiff

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

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

ForwardDiff is imported here but not used anywhere in this helper file. Dropping the unused import will reduce unnecessary loading/compilation during tests (especially since utils.jl is included in multiple test items).

Suggested change
using ForwardDiff

Copilot uses AI. Check for mistakes.
Comment thread test/runtests.jl Outdated
elseif GROUP == "QA"
activate_qa_env()
include("qa/runtests.jl")
@run_package_tests filter = ti -> endswith(ti.filename, "qa/runtests.jl")

Copilot AI Feb 15, 2026

Copy link

Choose a reason for hiding this comment

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

In the GROUP == "QA" branch, @run_package_tests is filtered to items whose filename ends with qa/runtests.jl, but test/qa/runtests.jl is still written using SafeTestsets/@safetestset (i.e., it does not define any @testitems). This will result in the QA group running zero tests. Consider either keeping include("qa/runtests.jl") for this branch (after activating the QA env) or converting the QA suite to @testitems and filtering those instead.

Suggested change
@run_package_tests filter = ti -> endswith(ti.filename, "qa/runtests.jl")
include("qa/runtests.jl")

Copilot uses AI. Check for mistakes.
@SouthEndMusic SouthEndMusic changed the title Replace SafeTestSets with TestItemRunner Replace SafeTestSets with TestItemRunner Feb 15, 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.

2 participants