Skip to content

Comments

[docs] add MathOptInterface.jl to the list of packages#92

Merged
giordano merged 1 commit intoJuliaTesting:mainfrom
odow:patch-1
Feb 23, 2026
Merged

[docs] add MathOptInterface.jl to the list of packages#92
giordano merged 1 commit intoJuliaTesting:mainfrom
odow:patch-1

Conversation

@odow
Copy link
Contributor

@odow odow commented Feb 23, 2026

Hey!

I started using this in https://github.com/jump-dev/MathOptInterface.jl

Some may find our workflow interesting.

There are a lot of tests in MOI, and it is almost entirely bottlenecked by compilation time. (I should probably experiment with Base.Experimental.@optlevel.)

We shard the tests into directories in /test, and then use ParallelTestRunner to parallelise over the files in each directory.

Each file is a module that automatically detects and runs all of the functions named test_.

I find this works much better than @testset, where I kept leaking stuff into setup and global scope and it was hard to maintain.

Now adding a test is: choose a file, add a function.

You can improve parallelisation by splitting tests into a new file

The biggest downside is that it's easy to add two functions with the same name that overwrite each other. So there's a test to avoid that:
https://github.com/jump-dev/MathOptInterface.jl/blob/ea3cf8ca0060d776bb351fe4f7e1698d308f105c/test/General/test_errors.jl#L430-L453

@giordano
Copy link
Collaborator

Thanks!

@giordano giordano merged commit 10225a7 into JuliaTesting:main Feb 23, 2026
2 checks passed
@vchuravy
Copy link
Member

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.

3 participants