Skip to content
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

Adding missing dependancies for testing #6035

Merged
merged 2 commits into from Jan 6, 2022
Merged

Conversation

notAutomne
Copy link
Contributor

Pygments is mandatory for the Flask server. If Pygments is missing PyTest will not run :

=== ERRORS ===
___ ERROR collecting docs/_themes/flask_theme_support.py ___
docs\_themes\flask_theme_support.py:2: in <module>
    from pygments.style import Style
E   ModuleNotFoundError: No module named 'pygments'
=== short test summary info ===
ERROR docs/_themes/flask_theme_support.py - ModuleNotFoundError: No module named 'pygments'

PySocks is mandatory for test_lowlevel.py, if PySocks is missing 8 tests could fail:

FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[http_proxy-http] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[https_proxy-https] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[all_proxy-http] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[all_proxy-https] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[HTTP_PROXY-http] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[HTTPS_PROXY-https] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[ALL_PROXY-http] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.
FAILED tests/test_lowlevel.py::test_use_proxy_from_environment[ALL_PROXY-https] - requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.

Pygments is mandatory for the Flask server
PySocks is mandatory for test_lowlevel.py
@nateprewitt
Copy link
Member

Hi @marwanpro, these dependencies are brought into our test environment from the socks extra. Our standard testing workflow is make followed by make ci. This will install the required dependencies and run the test suite.

Rather than duplicating our dependency requirements, I'd be willing to accept a PR adding -e .[socks] to the top of the requirements file. That will allow us to collapse this statement in the Makefile to a single call.

Regarding pygments, that file should not be being used anywhere in the docs and is mostly there as a legacy artifact. Could you provide more info on what is actually producing the error?

@notAutomne
Copy link
Contributor Author

Hi @nateprewitt

Regarding pygments, that file should not be being used anywhere in the docs and is mostly there as a legacy artifact. Could you provide more info on what is actually producing the error?

It's my fault, I run the command pytest without specifying tests

@notAutomne
Copy link
Contributor Author

Hi @marwanpro, these dependencies are brought into our test environment from the socks extra. Our standard testing workflow is make followed by make ci. This will install the required dependencies and run the test suite.

Rather than duplicating our dependency requirements, I'd be willing to accept a PR adding -e .[socks] to the top of the requirements file. That will allow us to collapse this statement in the Makefile to a single call.

Done in 4b0fa7e

Copy link
Member

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @marwanpro!

@nateprewitt nateprewitt merged commit 620ed4f into psf:main Jan 6, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants