Skip to content

Run tests individually #418

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

Open
s-celles opened this issue Jul 30, 2018 · 4 comments
Open

Run tests individually #418

s-celles opened this issue Jul 30, 2018 · 4 comments

Comments

@s-celles
Copy link
Member

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

@oxinabox
Copy link
Member

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.

@s-celles
Copy link
Member Author

I'm closing because this is in fact possible

$ julia test/runtests.jl stack

run test_stack.jl

@oxinabox
Copy link
Member

Woah

@s-celles s-celles reopened this Aug 1, 2018
@s-celles
Copy link
Member Author

s-celles commented Aug 1, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants