| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,3 +18,4 @@ docs/_build/ | |||
| 18 | 18 | /dist/ | |
| 19 | 19 | /zeroconf.egg-info/ | |
| 20 | 20 | /src/**/*.c | |
| 21 | + .hypothesis/ | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -92,6 +92,7 @@ setuptools = ">=83.0.0,<84.0.0" | |||
| 92 | 92 | pytest-timeout = "^2.1.0" | |
| 93 | 93 | pytest-codspeed = ">=5.0.3,<6.0" | |
| 94 | 94 | blockbuster = ">=1.5.27,<2.0.0" | |
| 95 | + hypothesis = {version = "^6.165.10", markers = "implementation_name == 'cpython'"} | ||
| 95 | 96 | ||
| 96 | 97 | [tool.poetry.group.docs.dependencies] | |
| 97 | 98 | sphinx = "^7.4.7 || ^8.1.3" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,6 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | 3 | from __future__ import annotations | |
| 4 | 4 | ||
| 5 | + import importlib.util | ||
| 6 | + import os | ||
| 5 | 7 | import threading | |
| 6 | 8 | from collections.abc import AsyncGenerator, Generator, Iterator | |
| 7 | 9 | from unittest.mock import patch | |
@@ -15,6 +17,20 @@ | |||
| 15 | 17 | from zeroconf._services import info as service_info | |
| 16 | 18 | from zeroconf.asyncio import AsyncZeroconf | |
| 17 | 19 | ||
| 20 | + # The dev dependency group only installs hypothesis on CPython (the CI | ||
| 21 | + # matrix pins pypy-3.10 and hypothesis ships no pp310 wheels), and a | ||
| 22 | + # non-dev install has no hypothesis at all. | ||
| 23 | + collect_ignore: list[str] = [] | ||
| 24 | + if importlib.util.find_spec("hypothesis") is None: | ||
| 25 | + collect_ignore.append("test_fuzz_incoming.py") | ||
| 26 | + else: | ||
| 27 | + from hypothesis import settings as _hypothesis_settings | ||
| 28 | + | ||
| 29 | + # Deterministic in CI; set HYPOTHESIS_PROFILE=long for a deep local run. | ||
| 30 | + _hypothesis_settings.register_profile("ci", derandomize=True, max_examples=200, deadline=None) | ||
| 31 | + _hypothesis_settings.register_profile("long", max_examples=50000, deadline=None) | ||
| 32 | + _hypothesis_settings.load_profile(os.environ.get("HYPOTHESIS_PROFILE", "ci")) | ||
| 33 | + | ||
| 18 | 34 | try: | |
| 19 | 35 | from blockbuster import BlockBuster, blockbuster_ctx | |
| 20 | 36 | except ImportError: # platforms without blockbuster (e.g. PyPy under QEMU) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments