M2 icon indicating copy to clipboard operation
M2 copied to clipboard

Load tests from "tests" subdirectory of package directory

Open d-torrance opened this issue 1 year ago • 1 comments

This update allows package authors to add files to the tests subdirectory of a package directory and have their contents automatically be loaded as package tests (like the Core tests), replacing the need to use TEST get(...). The JSON package is updated to use this feature as a proof of concept.

Surprisingly, only one package (Polyhedra) already had a tests subdirectory, so we shuffle around its files a bit.

Cc: @mikestillman -- we talked about this idea briefly at Fields

d-torrance avatar Feb 25 '25 03:02 d-torrance

I think it is a good idea. Just to check: each file is treated as a single test object, and this object is visible with tests("Foo"), right?

Yes, that's exactly right!

d-torrance avatar May 15 '25 02:05 d-torrance