This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Wrapper for matplotlib's image comparison test decorator.""" | |
| import contextlib | |
| import locale as locale_module | |
| from collections.abc import Callable, Generator, Iterable | |
| from locale import _setlocale as private_setlocale # type: ignore[attr-defined] | |
| from typing import overload | |
| from unittest import mock | |
| import matplotlib as mpl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import git | |
| import requirements | |
| def get_version(req): | |
| """Extracts version from requirement or raises an error if not specified.""" | |
| if req.specs: | |
| return req.specs[0][1] | |
| else: | |
| raise ValueError(f"Package {req.name} does not specify a version with '=='.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Middleware.""" | |
| from __future__ import annotations | |
| import logging | |
| import pathlib | |
| from django.conf import settings | |
| from whitenoise.middleware import WhiteNoiseMiddleware # type: ignore[import-untyped] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [tool.pytest.ini_options] | |
| addopts = [ | |
| "--strict-config", | |
| "--strict-markers", | |
| "--cov", | |
| "--cov-report=term-missing:skip-covered", | |
| "--cov-config=pyproject.toml", | |
| ] | |
| xfail_strict = true | |
| filterwarnings = [ "error" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/tests/test_udp.py b/tests/test_udp.py | |
| index 71728ec..a4fa85f 100644 | |
| --- a/tests/test_udp.py | |
| +++ b/tests/test_udp.py | |
| @@ -265,6 +265,12 @@ class _TestUDP: | |
| # it with EAGAIN), optionally letting the peer make room for it | |
| # before the loop runs again, and return the protocol events. | |
| # Any call to the loop's exception handler fails the test. | |
| + if self.implementation == 'asyncio' and sys.platform == 'darwin': | |
| + # macOS refuses UNIX datagrams with ENOBUFS rather than |