-
Notifications
You must be signed in to change notification settings - Fork 1
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
Remove pdf_cache folder before pytest #65
Conversation
Pull Request Test Coverage Report for Build 5695487083
💛 - Coveralls |
HistogramPdfSource
HistogramPdfSource
The combined template guy is required if we want the safeguard back in and it is useful for mismodelling tests I think it should be kept |
What about |
Less important for current use, but I think we should start using it instead of computing separate signals for each WIMP mass etc :) |
HistogramPdfSource
BTW, can we rename the folder to alea_test_pdf_cache or sth? |
The PR is only deleting |
And also the deletion only happens for |
ah, ok, yes then no prob. |
@kdund Can we go with this? |
I do not expect the readthedocs action to be passed because we have no docs yet. We can ignore it when merging. |
When I run pytest, I typically run it in the alea base folder-- that one is still there with this PR-- not sure how to best deal with this or if ignoring is best.. |
ah, wait-- am I understanding it right that this only deletes the cache before running tests (so not in cleanup?) |
Yes. It deletes |
IMO it should then, if possible also delete it after running the tests |
Since not all tests are based on |
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.
For me this now works-- and I understood the doc failure is sth that will be solved post-merge, right, @dachengx ?
What does the code in this PR do / what does it improve?
blueice
makespdf_cache
folder inalea/tests
folder when running test.https://github.com/JelleAalbers/blueice/blob/7c10222a13227e78dc7224b1a7e56ff91e4a8043/blueice/source.py#L73
https://github.com/JelleAalbers/blueice/blob/7c10222a13227e78dc7224b1a7e56ff91e4a8043/blueice/source.py#L106-L109
We should delete the folder because we do not want to reuse the cached sources when testing. Otherwise, some classes like
TemplateSource
will not be fully tested, because blueice will just use the cached source.Can you briefly describe how it works?
The pytest fixture allows us to do something before initializing the
TestCase
.The configuration of pytest fixture is following https://docs.pytest.org/en/stable/how-to/unittest.html#mixing-pytest-fixtures-into-unittest-testcase-subclasses-using-marks.
Can you give a minimal working example (or illustrate with a figure)?
Just as the pytest goes. Or
What are the potential drawbacks of the codes?
Please include the following if applicable:
Notes on testing
All italic comments can be removed from this template.