mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Examining the pytest.raises excinfo object should be done outside the with statement block. Previously, the raised exception prevented the assert from being executed. Per the docs: https://docs.pytest.org/en/latest/how-to/assert.html#assertions-about-expected-exceptions The exception is the "value" attribute, not "info". mypy also caught this mistake: tests/unit/test_network_utils.py:23: error: "ExceptionInfo[NetworkConnectionError]" has no attribute "info" [attr-defined] assert str(exc.info) == (
0 lines
ReStructuredText
0 lines
ReStructuredText