-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
GSoC '16 Testing Project, prelim task: skip slow tests (not to be merged) #508
Conversation
@@ -2,6 +2,9 @@ | |||
|
|||
|
|||
def pytest_addoption(parser): | |||
parser.addoption("--run-slow", action="store_true", | |||
help="include running slow tests during run") | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An option for detecting the command line flag --run-slow
has to be added in conftest.py. The task of detecting it is silently handled by pytest behind the curtains. 😄
- If --run-slow flag is not provided with py.test, the full tardis test will automatically be skipped. It will be run along only with --run-slow flag.
1fc82cd
to
e5c4fbc
Compare
- The script should be run with a trusted version of TARDIS and it will create two .npz files - each made from the ndarrays and astropy quantities of obtained radial1d model from a run with Stratified W7 setup. - The config file alongwith the abundancy and density profiles, and also the output .npz files are kept together under a directory 'tardis/tests/data/w7_13d'.
8b93732
to
bc2a601
Compare
- setup method initializes the filepaths to the config file and atom data file, brings in the benchmark data and performs a run. - methods to perform asserions for j_estimators and j_blue_estimators have been added.
efa0b73
to
e6cb426
Compare
- Some changes are made in setup() method of the integration test - the description about it is now updated in the block comments.
- numpy.ndarray *= astropy.units.Unit() was changed to numpy.ndarray=numpy.ndarray*astropy.units.Unit().
The slow integration test for Stratified W7 Setup now works fine!
|
- Individual modules were replaced and wrapped nicely inside a 'Collector' class. This class performs run of tardis against a setup and collects benchmark data for performing assertions in the future. - Updated documentation for better understanding and the code which was specific to w7 setup has been replaced to do the same job for any setup.
- base.py contains most of the code from previous version of test_w7.py and now test_w7.py has TestW& which simply is inheriting from class SlowTests of base.py and super calls are executed.
- The code is very much similar to integration test using W7 setup. A better way will be the use of parametrization, but doing it now will become a hindrance when some setup not much similar to these two is introduced. - So right now the integration test is made as the test of W7 setup - inheriting from base class and making super() calls.
@karandesai-96 - is this PR still needed? If not, we should close it. |
This PR had configuration files for AT setup as well, but I have the branch locally. Whatever building blocks were required, have been merged into master. Closing it finally. |
--run-slow
parameter is provided while running the tests. In a nutshell:./setup.py test
will skip full Tardis test inherently, no special parameters to provide../setup.py test --run-slow
will include Tardis slow test while running.