Skip to content

Commit

Permalink
Check if OptionalComponentsPresent exists before skipping tests
Browse files Browse the repository at this point in the history
It won't exist if we never called beginDocumentation(), resulting in a
"key not found" error.
  • Loading branch information
d-torrance committed Aug 6, 2024
1 parent f93336e commit 525b806
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion M2/Macaulay2/m2/testing.m2
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ check(ZZ, String) :=
check(ZZ, Package) := opts -> (n, pkg) -> check({n}, pkg, opts)
check(List, String) := opts -> (L, pkg) -> check(L, needsPackage (pkg, LoadDocumentation => true), opts)
check(List, Package) := opts -> (L, pkg) -> (
if not pkg.Options.OptionalComponentsPresent then (
if pkg.Options.?OptionalComponentsPresent
and not pkg.Options.OptionalComponentsPresent then (
printerr("warning: skipping tests; ", toString pkg, " requires optional components"); return);
usermode := if opts.UserMode === null then not noinitfile else opts.UserMode;
--
Expand Down

0 comments on commit 525b806

Please sign in to comment.