-
-
Notifications
You must be signed in to change notification settings - Fork 468
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
MAINT/TST: update tests to use pytest #477
Conversation
need pytest-cov for coverage with pytest
Nice. Good idea to not refactor anything yet I think, better to leave that for a separate PR.
Would be nice to keep it. Copying |
The Appveyor tests failed with an odd import error. |
Appveyor is passing now. Not sure if this is the best way to call |
Not really sure either, I can't remember the pytest cli most of the time because I always use |
I think we should probably remove the use of NumPy's # We don't actually use this ourselves anymore, but I'm not 100% sure that
# no-one else in the world is using it (though I hope not)
from .testing import Tester
# Pytest testing
from numpy._pytesttester import PytestTester
test = PytestTester(__name__)
del PytestTester The new |
I added a import pywt
pywt.test() and If we decide to do this, do we need to also append the NumPy BSD license to our LICENSE file? (Along the same lines, I think some files in |
That looks good to me, thanks!
Good point. Not the whole license, but a short snippet I think, similar to https://github.com/numpy/numpy/blob/master/LICENSE.txt#L34 This is also consistent with the first answer I found on stackoverflow: So I suggest something like:
|
That sounds good. I have added the text you suggested to the main LICENSE file. I also squashed a few of the trial/error commits related to Appveyor to clean up the commit history a bit. |
Awesome. All green, so in it goes. Thanks! |
This PR switches from
nose
topytest
as requested in #389, but has not tried to refactor any of the tests. Many tests could probably benefit from use of theparametrize
decorator, for instance, although that could be left to a follow-up PR.Some common code from
test_matlab_compatibility.py
andtest_matlab_compatibility_cwt.py
and code checking availability offutures
was factored out into a common file_pytest.py
, but otherwise the actual changes to the tests are pretty minimal.There are a few remaining things to be resolved:
1.) Do we need to remove the ability to run tests via
pywt.test()
or is there a way to maintain that without requiringnose
? It is still present currently, but usesnose
indirectly via NumPy and there are a couple of failures now when running the test this way because skips related to optional dependencypymatbridge
were not respected.2.) I'm not sure yet if code coverage is working correctly after these changes.
3.) I haven't tested running the pymatbridge-based tests via
PYWT_XSLOW
yet.closes #389