DataStructures.jl icon indicating copy to clipboard operation
DataStructures.jl copied to clipboard

Run tests individually

Open s-celles opened this issue 7 years ago • 4 comments

Hello,

When contributing for a given data structure of DataStructures.jl you have to run locally the whole test sets (which is quite long for my old MacBook Air mid-2011).

It will be nice if tests could be run individually.

Obviously... it shouldn't prevent a contributor to run all tests (if he wants)...

Anyway, if a contributor run just one test_.... . jl, CI should be able to catch errors that are found with other test_... .jl

Kind regards

s-celles avatar Jul 30 '18 20:07 s-celles

yes, this would be good.

The way this is done in a number of packages I maintain is to make each test file able to run from the commandline (or via include in the REPL), standalone, by adding to the top

using DataStructures
using Test

We could do that via sed script (or manually) and see if anything breaks, when running any alone.

oxinabox avatar Jul 31 '18 01:07 oxinabox

I'm closing because this is in fact possible

$ julia test/runtests.jl stack

run test_stack.jl

s-celles avatar Jul 31 '18 19:07 s-celles

Woah

oxinabox avatar Jul 31 '18 23:07 oxinabox

Maybe we should explain this in doc (see #360 ) Most Julia packages have paragraphs which explain how to install it / how to contribute / how to run unit tests... and so how to run a given test file.

s-celles avatar Aug 01 '18 11:08 s-celles