-
Notifications
You must be signed in to change notification settings - Fork 96
tests: Handle deprecation warnings in unit tests #862
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
Conversation
| credentials_file="credentials.json", | ||
| credentials=mock.sentinel.credentials, | ||
| ) | ||
| with pytest.warns(DeprecationWarning): |
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.
Add a comment to clarify that credentials_file is deprecated. Applies throughout
noxfile.py
Outdated
| # We use filterwarnings to ignore warnings that are out of our control, | ||
| # but we want to make sure that our own code does not generate warnings. | ||
| "-m", | ||
| "not filterwarnings", |
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.
We do want to see warnings as that may require code changes. We can filter warnings here with a comment that links to a bug with more information
python-api-core/pyproject.toml
Line 91 in 628003e
| filterwarnings = [ |
1. Deprecated
credentials_fileingoogle-auth:2. Future warnings are raised for Python
3.10:3.
.nox/unit_w_prerelease_deps-3-14failing: