-
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
Migrate to pytest or nose2 #104
Comments
I might be willing to help with this, as a prelude to adding type hints. I was able to get to 64 passed, 2 skipped, 7 warnings by disabling one failing test. In test_server_payload, the two assertions
are really testing the return value of stats_payload, which varies by platform. On my M1X laptop, psutil is broken, so stats_payload returns {}. This causes the two assertions able to fail. I suggest rewriting that test. I also suggest a few project changes:
|
I'm good with all of that if you want to take a shot at it. 👍 We're currently building python >= 3.7 in CI, but it looks like I forgot to update the README. I'll do that now. |
Which versions of django do you want to support? There is at least one change in 4.0 that broke your tests. This handy resource suggests that you would want to support 3.2, 4.x. |
Yep, we only want to support currently maintained releases! |
Plonk. |
So over on this tox branch, I've made some progress! First, I've successfully migrated the unit tests from setup.py to tox. Then migrated from nose to pytest. All core test pass! Just a couple from contrib/test_django.py and few from contrib/test_celery.py are failing:
But the best part is that Python 3.10 isn't failing on anything else. And even 3.11 generates only one new error--and it's from the same sketchy CeleryluginTestCase class. |
So this tox fork/branch was able to successfully build on Python 3.7 to 3.11 using I don't understand the first thing about |
Check out proof-of-concept PR #153. Feedback please! |
The "nose" package is no longer maintained, and causes failures on Python 3.10. I did some research, and it seems like there are two recommended options (feel free to make additional suggestions, though):
Here are some doc links related to each migration:
https://docs.pytest.org/en/stable/how-to/nose.html
https://docs.nose2.io/en/latest/differences.html
I started the nose -> pytest migration here:
https://github.com/honeybadger-io/honeybadger-python/tree/nose-to-pytest
If you run
python setup.py test
on that branch, 36 tests are passing, vs. 66 on the main branch. I think that's because of the known issues mentioned here. It may not be discovering all of the test directories, and there may be some unsupported doctests (I'm not sure on that).The text was updated successfully, but these errors were encountered: