-
-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor files in test/ so they can be run independently #2279
Conversation
- Make it so individual test files can be run - Time which tests take the most time - Currently, MutableArithmetics is the worst offender - Remove unneeded test entries in Project.toml
x_dual = [DualNumbers.Dual(x[i],1.0) for i in 1:length(x)] | ||
_epsilon(x::ForwardDiff.Dual{Nothing, Float64, 1}) = x.partials[1] | ||
|
||
forward_dual_storage = zeros(ForwardDiff.Dual{Nothing, Float64, 1},length(nd)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, it was always complaining that I didn't have DualNumbers
because I was not running the tests with ] test
.
Codecov Report
@@ Coverage Diff @@
## master #2279 +/- ##
=======================================
Coverage 91.26% 91.26%
=======================================
Files 42 42
Lines 4234 4234
=======================================
Hits 3864 3864
Misses 370 370 Continue to review full report at Codecov.
|
Objections to merging? Once this is in I can start teeing up the rest of the Test PRs. |
|
||
include(joinpath(@__DIR__, "utilities.jl")) | ||
|
||
@static if !(:JuMPExtension in names(Main)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we do this unusual check for JuMPExtension.jl but not utilities.jl?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Utilities just loads some functions, whereas JuMPExtension is a module so we get annoying WARNING: module JuMPExtension has been redefined
warnings.
The other PRs fix this by making each file a module, removing the need for the check. The module approach also prevents state leaking between files, and allows us to programmatically determine the tests to run within a particular file.
Refactored out of #2277