-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Update tests to work with latest test dependencies (mock, vcrpy in particular) #1217
Comments
Regarding test dependencies, I haven't had any issues using the latest versions for all of them, including the ones you specified. That error you're encountering is due to c880c90, where the default test account was switched from @tweepytest to @TheTweepyTester and cassettes were updated accordingly. That commit missed updating the default testing configuration: Line 14 in c880c90
However, c573a28 has updated the default test account and corresponding cassettes again, along with the default testing configuration this time, so this shouldn't be an issue anymore. For more details, see #1242. As for your additional points, I did and do plan on addressing them as follows:
This will also likely result in the following changes:
And include additional changes I'm planning:
|
I've now completed almost all of the changes I had planned. The only thing remaining to do is to drop usage of nose. Even the documentation for the library itself recommends against continuing to use it. Thus, I've already removed the only explicit usage of the library with 4312997. I don't see the point in migrating to nose2 and switching to another unnecessary library, so all that remains is to replace it with unittest. This should be relatively simple, only requiring setup.py to be updated to remove nose as a test requirement and suite and tox.ini and .travis.yml to be updated to run a unittest command with the specific test modules currently in setup.cfg. However, I don't see any reason to drop it entirely right now, as it's still working and requires little to no overhead, while providing a nice interface for tox and Travis CI and clean visual output for tests and coverage. Hence, I'm going to leave it as is for now until such a point where it's necessary to make changes. |
Following up, I've removed nose usage now, with b4c06a4, as it will stop working with Python 3.10 (nose-devs/nose#1099). I anticipate using pytest in the future, to facilitate testing with asyncio / aiohttp, etc. |
Thank you! |
Several tests fail when testing with the latest versions of test dependencies:
mock 3.x (3.0.4)
vcrpy 2.x (2.0.1)
These are the versions that exist (or are likely to exist) in downstream OS package sets, as they do for FreeBSD Ports in this case.
Most appear to fail with the same class of error, as follows:
If you would like the full set, let me know and I'll include them in a followup.
It would be great if testing was against the latest versions of their test dependencies to pick up bugs/incompatibility issues as early as possible. This ensures downstream consumers (packagers in particular) are able to extensively and reliably QA upstream packages, and ensure a great experience for users.
To achieve this I'd suggest (in a branch):
test_requirements.txt
in favour ofsetup.py:tests_require
(similar to 778bd7a for requirements.txt/install_requires)>=
) so latest versions are usedtox
dependency toextras_require { 'dev': ['tox'] }
(not tests_require) as its not a compulsory requirement (unlike nose, mock vcrpy otoh, which are 'required'). coverage flake and other development only dependencies can go in here too.The text was updated successfully, but these errors were encountered: