Commit Graph

5 Commits

Author SHA1 Message Date
Damian Shaw 68529081c2
Enforce f-strings via Ruff (#12393) 2023-11-07 09:14:56 +00:00
Jon Dufresne 60c274be2d Complete type annotations of tests/unit/ directory 2021-09-23 05:44:54 -07:00
Jon Dufresne bec53e0388 Fix unreachable code in tests/unit/test_network_utils.py
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) == (
2021-09-20 20:58:06 -07:00
Pradyun Gedam 94999255d5
Reformat the codebase, with black 2021-08-20 13:37:49 +01:00
gutsytechster 8c267e6e39
feat(pip/_internal/*): Use custom raise_for_status method 2020-07-08 18:08:55 +05:30