-
Notifications
You must be signed in to change notification settings - Fork 134
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
Fix various warnings when running pytest #46
Conversation
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.
Looks good. I do wonder if we should be making vcs
a fixture instead.
I didn't know fixtures could be parametrized as well. It works nicely and I like how much decorators this saves. Do let me know if the PEP8 cleanup introduces too many changes. |
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.
I do see a lot xpassed tests in Travis, but don't see exactly which ones. That does worry me cause on Travis they should pass because we have both git and mercurial available.
It's |
Still |
I still don't understand why |
This is a bit faster, but above all produces less verbose output on stdout.
Doing it the old way is deprecated in pytest 4.0 and will produce errors from pytest >= 4.1.
Only when it's available. It is not available on Python2, if 'configparser' is not installed (only the stdlib 'ConfigParser').
This producing warnings, in particular for '\d'.
Instead of 'files=file,names'. This avoids multiple PendingDeprecationWarning when running pytest.
This was failing in my local Python 2.
Proof that this is useful: I found a bug. Unit test 'test_non_existing_file' was defined twice so one of both versions was not being run! The second one is now called test_non_existing_second_file. Unit test count went from 140 to 141.
This saves quite some parametrize() decorators.
This includes xpassed tests. Mainly useful for seeing what went wrong in Travis CI.
aabb7b3
to
f33c91e
Compare
I squashed some commits and in f33c91e made pytest a bit more verbose on xpassed / xfailed tests. |
@c4urself Did you have a chance to look at this? Currently the Travis badge on https://github.com/c4urself/bump2version is showing "build: failing". Also, new contributors will face Travis failures on their merge requests like in #47. |
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.
Looks good. Unless @c4urself objects I don't mind merging this.
Thanks! |
This fixes #44 and silences various warnings and errors related to deprecated methods and text encoding.
It's checked against 2.7, 3.4 and 3.6. Will leave the other versions to CI to check.