WIP: Add unified test suite infrastructure#353
Closed
lesteve wants to merge 3 commits into
Closed
Conversation
Member
|
In principle this seems fine to me. Thank you for paying attention to the test suite. I agree that it could be better unified. |
Member
|
@lesteve let us know when this is ready! |
This was referenced May 12, 2020
4d181fe to
26a0e70
Compare
This was referenced Nov 1, 2021
Member
Author
|
Unlikely to work on this anytime soon, closing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8.
The idea is that there is a lot of tests that we would want to run for all the
FooClusterclasses. At the moment there is some duplication intest_sge.py,test_slurm.py, etc ... (e.g.test_basic,test_adaptive, ...) and some cluster-generic functionality are only tested for some clusters (e.g. onlytest_pbs.pyhas some tests for scaling with "grouped workers" e.g.test_scale_grouped).This is quite WIP at the moment but if you have some early feed-back about the approach don't hesitate! The main thing to look at is
test/test_cluster.py. The way it currently works is you add acheck_whatever(cluster, client)function intests/test_cluster.pyand there is a parametrizedtestfunction at the end that will run the tests for all thecheck_*functions and all theFooClusterclasses.This is somewhat influenced by how the "common tests" are structured in scikit-learn (this tests some common properties of all the scikit-learn estimators, for example that fitting twice with the same data gives the same result) and there may be a more clever way of doing it.
A few things I want to look at still (besides cleaning up all the TODO):
checkfunctions that need a real cluster (basically that need to do.scale). This could be based on a naming convention e.g.check_real_clustervscheckor be in different filestest_real_cluster.pyvstest_cluster.py(but then there would be some duplication). Maybe a clever pytest trick would do it (can we add pytest marks to normal functions and detect that) or even use a simple decorator that adds an attributed to the function and we can test this attribute in the parmetrizedtest.