-
Notifications
You must be signed in to change notification settings - Fork 26
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
TST: Test core, and related changes #62
Merged
Merged
Conversation
This file contains 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
which uses these to generate test resources set `a`.
For Python <3.4, we provide a subTest context manager that does nothing, so that there is graceful degredation of subTest.
If the data contains very few timepoints, our 30 taps mean the automatic padlen used by filtfilt of `3 * ntaps` will exceed the length of the data. We prevent this error by specifying the padlen to the min of `3 * ntaps` and one less than the length of the data, however further work needs to be done to give a better methodology when the dataset is small.
Previously, the notebook example was ``` fissa.Experiment(..., datahandler=datahandler_custom) ``` which doesn't actually supply the correct argument. The correct argument is ``` fissa.Experiment(..., datahandler_custom=datahandler_custom) ``` This was not caught previously because the Experiment class had an unused `**kwargs` keyword parameter collection, which was accepting the erroneous `datahandler` argument. As the `datahandler_custom` example is the same as `fissa.datahandler`, the fact that the argument was ignored was not noticed.
Codecov Report
@@ Coverage Diff @@
## master #62 +/- ##
===========================================
+ Coverage 38.44% 79.18% +40.73%
===========================================
Files 9 9
Lines 658 663 +5
Branches 128 129 +1
===========================================
+ Hits 253 525 +272
+ Misses 371 94 -277
- Partials 34 44 +10
Continue to review full report at Codecov.
|
Pull Request Test Coverage Report for Build 130
💛 - Coveralls |
Pull Request Test Coverage Report for Build 133
💛 - Coveralls |
Usually, `pool.join()` is needed to ensure the parent process is blocked until the pool is completed, however `pool.map` also blocks, so we didn't need it for that. https://docs.python.org/2/library/multiprocessing.html#multiprocessing.Process.join However, `pool.join` ensures the pool is cleaned up properly and exceptions are caught correctly. https://stackoverflow.com/a/38271957/1960959 For us, we need to use `pool.join` so the coverage is measured during each of the processes which are spawned, and they are amalgamated together afterwards. https://pytest-cov.readthedocs.io/en/latest/mp.html#ungraceful-pool-shutdown
In case two sets of unit tests are run at the same millisecond, or tests are run in parallel.
Closed
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.
fissa/tests/generate_downsampled_resources.py
.a
, and add it to the repo.datahandler_custom
for the custom datahandler (was usingdatahandler
instead, which was silently ignored bycore.Experiment.__init__
)