-
Notifications
You must be signed in to change notification settings - Fork 51
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
Hid HTTP request logs in tests; fixed a deprecation warning #147
Conversation
Fixed a deprecation warning Removed an unused test dependency enum34
Pull Request Test Coverage Report for Build 8031503346Details
💛 - Coveralls |
@@ -12,6 +13,11 @@ | |||
from virl2_client import ClientLibrary | |||
|
|||
|
|||
# set to warning to hide unwanted HTTP requests | |||
logger = logging.getLogger("httpx") | |||
logger.setLevel(logging.WARNING) |
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.
httpx logs unnecessary HTTP requests while testing (imo not needed)
HTTP Request: GET https://localhost/api/v0/system_information "HTTP/1.1 200 OK"
HTTP Request: POST https://localhost/api/v0/authenticate "HTTP/1.1 200 OK"
HTTP Request: GET https://localhost/api/v0/authok "HTTP/1.1 200 OK"
HTTP Request: GET https://localhost/api/v0/populate_lab_tiles "HTTP/1.1 200 OK"
HTTP Request: GET https://localhost/api/v0/labs/5f0d96/topology "HTTP/1.1 200 OK"
@@ -1,2 +1,2 @@ | |||
[metadata] | |||
description-file = README.md | |||
description_file = README.md |
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.
fixes the following deprecation warning
/root/dev/repos/simple/.venv/lib/python3.8/site-packages/setuptools/dist.py:472: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!
********************************************************************************
Usage of dash-separated 'description-file' will not be supported in future
versions. Please use the underscore name 'description_file' instead.
By 2024-Sep-26, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
test-requirements.txt
Outdated
@@ -10,7 +10,6 @@ click | |||
coverage | |||
coveralls | |||
docopt | |||
enum34 |
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.
Fixes a deprecation warning:
/root/dev/repos/simple/.venv/lib/python3.8/site-packages/setuptools/installer.py:44: UserWarning: Module enum was already imported from /usr/lib/python3.8/enum.py, but /root/dev/repos/virlutils/.eggs/enum34-1.1.10-py3.8.egg is being added to sys.path
pkg_resources.working_set.add(dist, replace=True)
There are still some deprecation warnings left but I don't have time to solve them now.
|
@@ -5,3 +5,4 @@ omit = | |||
*/templates/* | |||
*/static/* | |||
*/examples/* | |||
tests/* |
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 don't see a point in covering test files, but I put it into a separate commit in case it needs to be reverted.
No description provided.