Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/TestItemRunner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ Run all test items in a directory and its subdirectories.
- `path`: The path to the directory containing the tests.
- `filter`: A filter function to apply to the test items.
- `verbose`: Whether to run the tests in verbose mode.
- `testset`: An optional argument to specify a custom testset type or function to use. It must accept the `verbose` keyword argument.
"""
function run_tests(path; filter=nothing, verbose=false)
function run_tests(path; filter=nothing, verbose=false, testset=testset)
Copy link
Member

Choose a reason for hiding this comment

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

This is not yet fully implemented, right? Value here is never used, and the default argument not defined?

Copy link
Contributor Author

@evetion evetion Jun 24, 2025

Choose a reason for hiding this comment

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

@davidanthoff It is, testset is used on line 197,199,220, and defined on line 268.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@davidanthoff Friendly bump

# Find package name
package_name = ""
package_filename = isfile(joinpath(path, "Project.toml")) ? joinpath(path, "Project.toml") : isfile(joinpath(path, "JuliaProject.toml")) ? joinpath(path, "JuliaProject.toml") : nothing
Expand Down Expand Up @@ -230,7 +231,7 @@ end
"""
@run_package_tests(ex...)

Run all test items in a package, using optional filter and verbosity arguments.
Run all test items in a package, using optional filter, verbosity and testset arguments.

# Usage
```julia
Expand All @@ -244,12 +245,13 @@ Run all test items in a package, using optional filter and verbosity arguments.
# Arguments
- `filter`: An optional filter function to apply to the test items.
- `verbose`: An optional argument to specify verbosity.
- `testset`: An optional argument to specify a custom testset type or function to use. It must accept the `verbose` keyword argument.
"""
macro run_package_tests(ex...)
kwargs = []

for i in ex
if i isa Expr && i.head==:(=) && length(i.args)==2 && i.args[1] in (:filter, :verbose)
if i isa Expr && i.head == :(=) && length(i.args) == 2 && i.args[1] in (:filter, :verbose, :testset)
push!(kwargs, esc(i))
else
error("Invalid argument")
Expand Down
Loading