From 32828de6865be28d0fa7844ae19e0e302fe6885c Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Mon, 17 Aug 2026 12:07:03 +0400 Subject: [PATCH] test: populate the benchmark, stress and property-based tiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Makefile wires up three test tiers this repo never filled. `make test` passed --ignore=tests/benchmarks --ignore=tests/stress for directories that did not exist, `make benchmark` and `make stress` had nothing to run, and hypothesis shipped via .rhiza/requirements/tests.txt without a single import. tests/benchmarks/ measures the two hot paths: DataManager.get_chunk, which runs on every pan and zoom, and validate_input, which dominates plot() start-up. On this machine a 5k-bar viewport slice costs ~218us and a full 250k-bar serialize ~14.5ms. tests/stress/ pushes the shared _data_managers registry the unit suite only touches one session at a time: 100 concurrent registrations, 200 overlapping reads of one manager, and create/delete churn. The property tests state validate_input's contract as invariants rather than examples — every series normalizes to a length-n ndarray, length disagreement always raises, auto-filled high never falls below low, and list and ndarray inputs agree. They carry the `property` marker that pytest.ini already registers, so `make hypothesis-test` selects them. hypothesis is added to the test dependency group so `uv run pytest` works without `make install` having run first, matching that group's stated intent. Both new directories are exempt from check_test_layout.py by design, so test/source parity still holds. Coverage stays at 100%. Closes #86 Co-Authored-By: Claude Opus 5 (1M context) --- pyproject.toml | 5 + tests/benchmarks/__init__.py | 5 + tests/benchmarks/test_ingestion_benchmarks.py | 66 +++++++++++ tests/pycharting/data/test_ingestion.py | 80 +++++++++++++ tests/stress/__init__.py | 6 + tests/stress/test_session_registry_stress.py | 108 ++++++++++++++++++ uv.lock | 83 ++++++++++++++ 7 files changed, 353 insertions(+) create mode 100644 tests/benchmarks/__init__.py create mode 100644 tests/benchmarks/test_ingestion_benchmarks.py create mode 100644 tests/stress/__init__.py create mode 100644 tests/stress/test_session_registry_stress.py diff --git a/pyproject.toml b/pyproject.toml index 088ef84..6ed7fe1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,11 @@ test = [ "pytest>=8.3.0,<9.0.0", "pytest-cov>=6.0.0", "httpx>=0.27.0,<0.29.0", + # Property-based tests for validate_input live in + # tests/pycharting/data/test_ingestion.py. Also supplied by rhiza's + # .rhiza/requirements/tests.txt, but declared here so `uv run pytest` + # works without `make install` having run first. + "hypothesis>=6.100.0", ] lint = [ "ruff>=0.6.0", diff --git a/tests/benchmarks/__init__.py b/tests/benchmarks/__init__.py new file mode 100644 index 0000000..7bb4dc5 --- /dev/null +++ b/tests/benchmarks/__init__.py @@ -0,0 +1,5 @@ +"""Performance benchmarks, run by ``make benchmark``. + +Excluded from ``make test`` (``--ignore=tests/benchmarks``) because benchmarks +measure rather than assert, and are unreliable under ``pytest-xdist``. +""" diff --git a/tests/benchmarks/test_ingestion_benchmarks.py b/tests/benchmarks/test_ingestion_benchmarks.py new file mode 100644 index 0000000..d08996e --- /dev/null +++ b/tests/benchmarks/test_ingestion_benchmarks.py @@ -0,0 +1,66 @@ +"""Benchmarks for the hot path: validation on ingest, and slicing on every viewport move. + +``DataManager.get_chunk`` is called once per pan/zoom in the browser, so its cost +is what the user feels as lag. ``validate_input`` is paid once per ``plot()`` call +but walks every series, so it dominates start-up on large inputs. + +Run with ``make benchmark``. These are excluded from ``make test``. +""" + +from __future__ import annotations + +import numpy as np +import pandas as pd +import pytest + +from pycharting.data.ingestion import DataManager, validate_input + +# Large enough to be dominated by the array work rather than call overhead, +# small enough that the suite stays inside pytest.ini's 60s timeout. +N = 250_000 +CHUNK = 5_000 + + +@pytest.fixture(scope="module") +def ohlc() -> dict[str, np.ndarray]: + """A dense OHLC series of ``N`` bars with a datetime index and two overlays.""" + rng = np.random.default_rng(seed=0) + close = np.cumsum(rng.standard_normal(N)) + 1_000.0 + return { + "index": pd.date_range("2020-01-01", periods=N, freq="min"), + "open": close - 0.5, + "high": close + 1.0, + "low": close - 1.0, + "close": close, + } + + +@pytest.fixture(scope="module") +def manager(ohlc: dict[str, np.ndarray]) -> DataManager: + """A ``DataManager`` over the dense series, built once for the module.""" + return DataManager(**ohlc) + + +def test_validate_input_on_dense_ohlc(benchmark, ohlc: dict[str, np.ndarray]) -> None: + """Cost of normalizing a dense OHLC series — paid once per plot() call.""" + result = benchmark(lambda: validate_input(**ohlc)) + assert len(result["close"]) == N + + +def test_get_chunk_viewport_slice(benchmark, manager: DataManager) -> None: + """Cost of one viewport slice — paid on every pan and zoom.""" + mid = N // 2 + result = benchmark(lambda: manager.get_chunk(mid, mid + CHUNK)) + assert len(result["index"]) == CHUNK + + +def test_get_chunk_full_range(benchmark, manager: DataManager) -> None: + """Cost of serializing the whole series, the worst case on first paint.""" + result = benchmark(lambda: manager.get_chunk()) + assert len(result["index"]) == N + + +def test_data_manager_construction(benchmark, ohlc: dict[str, np.ndarray]) -> None: + """End-to-end ingest cost: validation plus array retention.""" + result = benchmark(lambda: DataManager(**ohlc)) + assert result.length == N diff --git a/tests/pycharting/data/test_ingestion.py b/tests/pycharting/data/test_ingestion.py index 9bae2be..e7f41d5 100644 --- a/tests/pycharting/data/test_ingestion.py +++ b/tests/pycharting/data/test_ingestion.py @@ -6,6 +6,9 @@ import numpy as np import pandas as pd import pytest +from hypothesis import given, settings +from hypothesis import strategies as st +from hypothesis.extra.numpy import arrays from pycharting.data.ingestion import DataManager, DataValidationError, validate_input @@ -779,3 +782,80 @@ def test_get_chunk_data_types(self): # Individual values should be Python numbers assert isinstance(chunk["open"][0], (int, float)) + + +# --------------------------------------------------------------------------- +# Property-based tests — run by `make hypothesis-test` (-m "hypothesis or property") +# and, being under tests/pycharting/, also by the regular `make test` run. +# +# validate_input's contract is stated as invariants rather than examples: every +# output is a length-n ndarray, length disagreement always raises, and the +# single-vs-multi series mode is decided purely by how many of OHLC are present. +# Those are properties, so they are tested as properties. +# --------------------------------------------------------------------------- + + +@pytest.mark.property +@given( + values=arrays( + dtype=np.float64, + shape=st.integers(min_value=1, max_value=200), + elements=st.floats(min_value=-1e6, max_value=1e6, allow_nan=False), + ), +) +@settings(max_examples=50, deadline=None) +def test_close_only_input_always_normalizes_to_line_mode(values): + """Any single series is mapped to `close`, leaving open/high/low unset.""" + result = validate_input(np.arange(len(values)), close=values) + + assert isinstance(result["close"], np.ndarray) + assert len(result["close"]) == len(values) + assert result["open"] is None + assert result["high"] is None + assert result["low"] is None + + +@pytest.mark.property +@given( + n=st.integers(min_value=1, max_value=200), + delta=st.integers(min_value=1, max_value=20), +) +@settings(max_examples=50, deadline=None) +def test_length_mismatch_always_raises(n, delta): + """A series whose length differs from the index is always rejected.""" + index = np.arange(n) + close = np.zeros(n + delta) + + with pytest.raises(DataValidationError, match="does not match index length"): + validate_input(index, close=close) + + +@pytest.mark.property +@given( + values=arrays( + dtype=np.float64, + shape=st.integers(min_value=1, max_value=100), + elements=st.floats(min_value=1.0, max_value=1e5, allow_nan=False), + ), +) +@settings(max_examples=50, deadline=None) +def test_ohlc_high_is_never_below_low(values): + """With open and close supplied, the auto-filled high never falls below low.""" + result = validate_input(np.arange(len(values)), open=values, close=values + 1.0) + + assert np.all(result["high"] >= result["low"]) + + +@pytest.mark.property +@given( + values=st.lists(st.floats(min_value=-1e6, max_value=1e6, allow_nan=False), min_size=1, max_size=100), +) +@settings(max_examples=50, deadline=None) +def test_list_series_and_ndarray_series_agree(values): + """Passing a list and the equivalent ndarray produce the same normalized output.""" + index = np.arange(len(values)) + + from_list = validate_input(index, close=values) + from_array = validate_input(index, close=np.array(values, dtype=np.float64)) + + assert np.array_equal(from_list["close"], from_array["close"]) diff --git a/tests/stress/__init__.py b/tests/stress/__init__.py new file mode 100644 index 0000000..c7bf6c5 --- /dev/null +++ b/tests/stress/__init__.py @@ -0,0 +1,6 @@ +"""Stress and load tests, run by ``make stress`` (selected via ``-m stress``). + +Excluded from ``make test`` (``--ignore=tests/stress``) because these push +volume and concurrency rather than assert a single behaviour, and are slower +than the unit suite. +""" diff --git a/tests/stress/test_session_registry_stress.py b/tests/stress/test_session_registry_stress.py new file mode 100644 index 0000000..c5fa916 --- /dev/null +++ b/tests/stress/test_session_registry_stress.py @@ -0,0 +1,108 @@ +"""Stress tests for the session registry and the slicing path under concurrency. + +``_data_managers`` is a plain module-level dict shared by every request handler, +and the chart frontend issues overlapping ``/api/data`` requests while the user +pans. These tests push that path harder than the unit suite does: many sessions +at once, churn of create/delete, and concurrent reads of the same manager. + +Run with ``make stress``. Excluded from ``make test``. +""" + +from __future__ import annotations + +from concurrent.futures import ThreadPoolExecutor + +import numpy as np +import pytest +from fastapi.testclient import TestClient + +from pycharting.api.routes import _data_managers +from pycharting.core.server import create_app +from pycharting.data.ingestion import DataManager + +pytestmark = pytest.mark.stress + +BARS = 20_000 +SESSIONS = 100 +WORKERS = 16 + + +@pytest.fixture +def client() -> TestClient: + """A test client over a fresh app, with the session registry cleared around it.""" + _data_managers.clear() + try: + yield TestClient(create_app()) + finally: + _data_managers.clear() + + +def _series(n: int = BARS) -> dict[str, np.ndarray]: + """A deterministic OHLC payload of ``n`` bars.""" + rng = np.random.default_rng(seed=1) + close = np.cumsum(rng.standard_normal(n)) + 500.0 + return { + "index": np.arange(n), + "open": close - 0.5, + "high": close + 1.0, + "low": close - 1.0, + "close": close, + } + + +def test_many_concurrent_sessions_stay_isolated(client: TestClient) -> None: + """Registering many sessions at once keeps each one's data distinct.""" + payload = _series(1_000) + + def register(i: int) -> str: + # Shift the whole bar, not just close — validate_input enforces + # high >= max(open, close), so offsetting one series in isolation + # is rejected. + session = f"stress-{i}" + shifted = {k: (v + i if k != "index" else v) for k, v in payload.items()} + _data_managers[session] = DataManager(**shifted) + return session + + with ThreadPoolExecutor(max_workers=WORKERS) as pool: + sessions = list(pool.map(register, range(SESSIONS))) + + assert len(_data_managers) == SESSIONS + # Each session kept its own offset rather than aliasing a shared array. + for i, session in enumerate(sessions): + assert _data_managers[session].close[0] == pytest.approx(payload["close"][0] + i) + + +def test_concurrent_chunk_reads_are_consistent(client: TestClient) -> None: + """Overlapping viewport reads of one session all return the same bytes.""" + _data_managers["shared"] = DataManager(**_series()) + manager = _data_managers["shared"] + expected = manager.get_chunk(0, 500)["close"] + + def read(_: int) -> list[float]: + return manager.get_chunk(0, 500)["close"] + + with ThreadPoolExecutor(max_workers=WORKERS) as pool: + results = list(pool.map(read, range(200))) + + assert all(r == expected for r in results) + + +def test_session_churn_does_not_leak(client: TestClient) -> None: + """Repeated create/delete cycles leave the registry empty.""" + for i in range(SESSIONS): + session = f"churn-{i}" + _data_managers[session] = DataManager(**_series(500)) + response = client.delete(f"/api/sessions/{session}") + assert response.status_code == 200 + + assert _data_managers == {} + + +def test_full_range_slice_of_a_large_series(client: TestClient) -> None: + """A whole-series slice serializes every bar without truncating.""" + _data_managers["big"] = DataManager(**_series()) + + chunk = _data_managers["big"].get_chunk() + + assert len(chunk["index"]) == BARS + assert len(chunk["close"]) == BARS diff --git a/uv.lock b/uv.lock index 691c2d4..8c67b77 100644 --- a/uv.lock +++ b/uv.lock @@ -236,6 +236,78 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" }, ] +[[package]] +name = "hypothesis" +version = "6.165.10" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "sortedcontainers" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5c/e2/0fad246d2b6330e1f78479bfc566b5c22be82aee8a865cde9a08f648487d/hypothesis-6.165.10.tar.gz", hash = "sha256:68b45e09834cd80523cb1eb274463073c7a9af4e4ef7cff34d9615f355572d32", size = 503703, upload-time = "2026-08-16T22:56:15.404Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/05/c1/9a9538e6d185baf5cc7f15bc3b76e08efbb3de4b3c782f234356449c0dd7/hypothesis-6.165.10-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:f839d29d0cc12048cf073d88ca4fdf94d420bc2b8afd69641ff6d496422ccd4f", size = 783243, upload-time = "2026-08-16T22:55:44.058Z" }, + { url = "https://files.pythonhosted.org/packages/a1/30/b70d9d79e871a75cbdeccd9067f20ecdb9eb2a1dfa03c630be3ad13b8b30/hypothesis-6.165.10-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:e10858f57ed0e74baa04393845f469fe8ad502c16ece4499bef7700c575611bd", size = 778815, upload-time = "2026-08-16T22:55:46.948Z" }, + { url = "https://files.pythonhosted.org/packages/db/52/6f0a9b7aab24b0635e2238f3fbddea5b54b17879ac813df42a3cc3384c5c/hypothesis-6.165.10-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76a7be86d986223b9f1bdb7e7cbcdb048649901fdb956c598ef73bdab1786cd5", size = 1108009, upload-time = "2026-08-16T22:54:53.082Z" }, + { url = "https://files.pythonhosted.org/packages/f6/06/8d0d4e11ff02350d09ec9f9e90af354158e59e16a8907ba5199a4ff2d7e8/hypothesis-6.165.10-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:717aea574e0e5edba2868aa66b1caae335d8f1ad3fb29f01dd6502953fa823a1", size = 1136596, upload-time = "2026-08-16T22:54:54.443Z" }, + { url = "https://files.pythonhosted.org/packages/59/dd/01a1e440f2e38dc1ccf5d597af5b8a0bee5f21b674c99c123b5554de9690/hypothesis-6.165.10-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4334058033e0214475f019e15492a50f3854fe8728cf51fe25c6191a2c3f8e52", size = 1135234, upload-time = "2026-08-16T22:55:08.911Z" }, + { url = "https://files.pythonhosted.org/packages/7d/18/8a26c24d3d9db20265f39df341ab265858c094e209571e3179cf237935f4/hypothesis-6.165.10-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2abb50cf1cf77d721de0a24c3f99d9c4ffdeb2cbd1e12aebb5a7a93e2b6b6d1f", size = 1157528, upload-time = "2026-08-16T22:56:02.159Z" }, + { url = "https://files.pythonhosted.org/packages/ea/8e/ce3c829b1937402d7944420ca26a05a0c8563e894dcff03d34ffa279d306/hypothesis-6.165.10-cp310-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:3de69aa8b924b400291a3cc42aaf78e6ab65c905a3e7e1a5dc39d95ef1b428cb", size = 1112870, upload-time = "2026-08-16T22:54:55.919Z" }, + { url = "https://files.pythonhosted.org/packages/f2/1b/4c4926d6c9a2b5d7cc090cc1e91219d6796102aa2a2c4b8f961c939e60b5/hypothesis-6.165.10-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5841331c504e02d7c334591681cb8587cdd59dee7e149db6d3db8e3f9e9f02eb", size = 1149683, upload-time = "2026-08-16T22:55:30.567Z" }, + { url = "https://files.pythonhosted.org/packages/cb/f9/df24eb28412f82465e2b7707f0ff1ec274d580bce389d4d9156617dc7bba/hypothesis-6.165.10-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2d0e0f8263d34dd8fa3b39eaa9a50bba56a8470b3dd9ebf6672d10840abe063e", size = 1283402, upload-time = "2026-08-16T22:54:18.054Z" }, + { url = "https://files.pythonhosted.org/packages/4d/07/c2b2a761300cf60b90ccebba4328175331e67d34f4fbd39429a7ddcdce49/hypothesis-6.165.10-cp310-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:0c4e6869817c3cfdf5a2b4d348497b95159bdecb3365be732c9b8570e36a4eef", size = 1409948, upload-time = "2026-08-16T22:54:22.343Z" }, + { url = "https://files.pythonhosted.org/packages/f4/ec/1c2bf1acdd0e273d81f833f85caf0ae5423db68a783554992fca36e6c541/hypothesis-6.165.10-cp310-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:9f07ae36c3b093e13687a894e79fe69e98a94c0b67fef656c575247682218143", size = 1265023, upload-time = "2026-08-16T22:54:41.402Z" }, + { url = "https://files.pythonhosted.org/packages/3d/a8/7f984908b7391160c7801b84e51ca8e4ba88c89e8d8811aa1aa7c03de73c/hypothesis-6.165.10-cp310-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:aff1f584c9538e8979cd180b1d70bf99bc16be19d4666414f49e5942b21a4f2c", size = 1282698, upload-time = "2026-08-16T22:56:06.998Z" }, + { url = "https://files.pythonhosted.org/packages/48/78/3a5d91c2d0250521736c42dfa2402b75049bc5fe2fb716c10bc84bb91ed1/hypothesis-6.165.10-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:1f2c4db25fb8ec1a16a8dba580666337b8ffb1887c4cf1750cc954313897cef7", size = 1324816, upload-time = "2026-08-16T22:54:46.675Z" }, + { url = "https://files.pythonhosted.org/packages/6f/99/27450763853a034bca1574d3e0a315164b33ff49c3862df6872dda45e25e/hypothesis-6.165.10-cp310-abi3-win32.whl", hash = "sha256:b33dc30170a7402e03c180f2c5ef69dc077152f35b91621e9cebcde9c7d71746", size = 669039, upload-time = "2026-08-16T22:55:11.962Z" }, + { url = "https://files.pythonhosted.org/packages/2c/fc/ff2988b72b5705ad9ca500444bf3f43e3c2f41edfa034bbfeb23b215791a/hypothesis-6.165.10-cp310-abi3-win_amd64.whl", hash = "sha256:e9f924aa610c0618445e1e8738c822c3190ce2a2699a0cb48ec3a351a96761f2", size = 675213, upload-time = "2026-08-16T22:55:01.697Z" }, + { url = "https://files.pythonhosted.org/packages/c5/8b/821810d36f78d9d9421cd2c5d9d36983b45bb3575c3086276cc5c76f9f73/hypothesis-6.165.10-cp310-abi3-win_arm64.whl", hash = "sha256:1d305448e9bd8e2f4f3cea0eafd809efdaab4e998a0019bc615650c8463e42f1", size = 673537, upload-time = "2026-08-16T22:54:47.898Z" }, + { url = "https://files.pythonhosted.org/packages/e9/45/cde4f78afe2b9e29caecf38319eedc1deb76aebcacbdd128e03cbb2511c3/hypothesis-6.165.10-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:637445c1593a2a9d1024fda50082f07bb56baedda78d90a25f64b8111727ef94", size = 784835, upload-time = "2026-08-16T22:54:45.429Z" }, + { url = "https://files.pythonhosted.org/packages/7f/81/847f30b81cbfd07607296b3ce43067cf4f80799bd9244167f587de9c8081/hypothesis-6.165.10-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:713f4ce4e82c26b53031f139de959bc9e8b54d3995aa824b89bbdf8229df2a45", size = 776419, upload-time = "2026-08-16T22:55:33.633Z" }, + { url = "https://files.pythonhosted.org/packages/04/66/4c71c5be7a49d84b8c3a9278c1807c4c81181ab5474beb27df9d4c40dc0e/hypothesis-6.165.10-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f9ff356e97e3ab09db07c8b675efa67340103874a0bae7465acb83dad7a35f7f", size = 1106830, upload-time = "2026-08-16T22:55:10.389Z" }, + { url = "https://files.pythonhosted.org/packages/e3/c4/e2cbd2810e79f7a452a8ea9f6c6438ee718ce938d8cc12252cf0b36a81d3/hypothesis-6.165.10-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1a380bc99aa3b035e6a95a2201bf792d4082a04ca75babcc21849c2d0914bb28", size = 1156952, upload-time = "2026-08-16T22:55:53.35Z" }, + { url = "https://files.pythonhosted.org/packages/a8/8b/794ced36864825492ac3712d5acab5a257b4601e6a9dc2ccdd3937198f87/hypothesis-6.165.10-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e9acb2c4d9cb532c3fedea74159f7b923c8c036328c9239b4049e7aa073bdd81", size = 1280780, upload-time = "2026-08-16T22:54:34.983Z" }, + { url = "https://files.pythonhosted.org/packages/5d/2d/550525442cdbcc2daf1f9bdd8ba35bcbde63db7c7a22f2ef137fbb49df2f/hypothesis-6.165.10-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:8660572b2d424bf5369ea8990985225f70bd1615b76ecd9c25588a3b9307009f", size = 1324130, upload-time = "2026-08-16T22:55:48.659Z" }, + { url = "https://files.pythonhosted.org/packages/74/59/6caf69dd5fe03499ada94c9cec016bffcc164511c6b93fe680f01209b9ff/hypothesis-6.165.10-cp312-cp312-win_amd64.whl", hash = "sha256:3376f2594763aef14faa519b0fb27cae7ce9eeaab4c69efa07777499110306c9", size = 672337, upload-time = "2026-08-16T22:54:49.11Z" }, + { url = "https://files.pythonhosted.org/packages/b1/fb/c82c5bd92864ffcf319772fedc8c9bf2dbe4ca14baa0fee6e49e67b5ba1c/hypothesis-6.165.10-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:9d77c3be7b429875036ad0f0597c6e5cc6bb17894a4da005e3807de64d2673ad", size = 784726, upload-time = "2026-08-16T22:54:32.371Z" }, + { url = "https://files.pythonhosted.org/packages/0e/b9/3d7acd08506da85557e65147b7f3fca8c47684e33be90bee0acb523920db/hypothesis-6.165.10-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:490c56b830772b0eca3b4b2cecb3741a1ed26b1d7206a279e1525dbf0aa95ee4", size = 776375, upload-time = "2026-08-16T22:55:13.303Z" }, + { url = "https://files.pythonhosted.org/packages/38/6b/922e8b3f9a706dd89d440b9545d2c6231c65e74da1c1fee3ff36c251b9c4/hypothesis-6.165.10-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed68e27b8a61e57a3ccdc7c5a14499e00b54dfe223087204d5d40b3b5ef58b6d", size = 1106763, upload-time = "2026-08-16T22:55:06.129Z" }, + { url = "https://files.pythonhosted.org/packages/01/39/f5b9a5d390d4edd1ad472334493ac442963ebeb4daaa74ff4bdac6ef292f/hypothesis-6.165.10-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6caadcd1afb62630ff5c5ff353626eaa616553a5971295ad6dc2b19ca8a39620", size = 1156778, upload-time = "2026-08-16T22:54:33.824Z" }, + { url = "https://files.pythonhosted.org/packages/b5/5f/5fbe1be4326337fd6acefe2d18ed44007ee1dc1f98fe5b3c0eb22942364d/hypothesis-6.165.10-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9145fe43ebb22e66672967c3fab411793b226ed776e4fe282271bca6ad3c0bb", size = 1280756, upload-time = "2026-08-16T22:55:54.834Z" }, + { url = "https://files.pythonhosted.org/packages/25/c0/cf6f9e1ef632a1a75694eed0db3a02e6fc75c367a363e94acee52f043c64/hypothesis-6.165.10-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:79900a9920a0b1d3a626c03a90ac6bf7042e78d46906a565b86a0dbe926f1d96", size = 1323889, upload-time = "2026-08-16T22:55:56.567Z" }, + { url = "https://files.pythonhosted.org/packages/cc/cc/662b94880f260b0a88de1fdcf60fc9984f6e2a796da549542adc10a7bc83/hypothesis-6.165.10-cp313-cp313-win_amd64.whl", hash = "sha256:c01dd04044c472e47193b54f68e84e08d6ebf4f29551885aa959b015f7cd9747", size = 672346, upload-time = "2026-08-16T22:56:03.792Z" }, + { url = "https://files.pythonhosted.org/packages/3f/77/55e020c9c576532ff7d20bf8b1dfa052ecbd5ada1949b02f76c44c966f7e/hypothesis-6.165.10-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:9ccac776b2ca93b324806facd526ccb45da0fd035001c899a35b02c44431e209", size = 784833, upload-time = "2026-08-16T22:55:21.255Z" }, + { url = "https://files.pythonhosted.org/packages/4f/f2/01da2adf829cf549eaddcabb8e8072077fb3d26da4275f4c1e89b2c0af74/hypothesis-6.165.10-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:e5f95f7b622e4171096d92175dda0a560f0955ade9b8a3a07bdcf151f7359611", size = 776545, upload-time = "2026-08-16T22:56:10.159Z" }, + { url = "https://files.pythonhosted.org/packages/cf/8e/58d4f842895220b793c53fc94a6489705b3665bb4d0ae4d338ce03fdf9fb/hypothesis-6.165.10-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f76d1562643693b8a40066f1f96af795b93fd9bcfc9690a1af2ff4c5867ee29e", size = 1107271, upload-time = "2026-08-16T22:54:50.266Z" }, + { url = "https://files.pythonhosted.org/packages/8f/b8/206468912d2153306bb8a41afdfc59e45b7a73a0495bbe4b9cb4f0e79c1d/hypothesis-6.165.10-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60cab3ab4ea468d31a33739ffd7e94ec3e37dea891d65a6582ecc8a477175191", size = 1156915, upload-time = "2026-08-16T22:54:25.89Z" }, + { url = "https://files.pythonhosted.org/packages/fb/d3/bf5a22929b70a4cfd3edf69c5642b029b27ddb5cfda48fa295d384b01abb/hypothesis-6.165.10-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:22cf19388f0ff6ced8eb3e49c903d14938e4ed909d93bf28383eef451511e424", size = 1281205, upload-time = "2026-08-16T22:54:44.083Z" }, + { url = "https://files.pythonhosted.org/packages/07/a2/d7b2ba444d36fc84d4779f4431e74dd9b023dc63bcf282199f6e48ad39f4/hypothesis-6.165.10-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:057d0232f1224dcd0b7698902551a4341a7399f90670b036db6c4376715fe889", size = 1324243, upload-time = "2026-08-16T22:55:41.123Z" }, + { url = "https://files.pythonhosted.org/packages/d1/95/afe6b531fd01928c6f63d394ee413fa2338d088b2b44efcc23596b54477e/hypothesis-6.165.10-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:ab0f2e9d7d7d4db257f7cf53de3706c2baf124269571f20ffc2bcd6781f03063", size = 616382, upload-time = "2026-08-16T22:55:18.449Z" }, + { url = "https://files.pythonhosted.org/packages/48/86/9b4fb75f520a028edec50ffc904a94d724180395d71feb6d7a0ce7bb6f00/hypothesis-6.165.10-cp314-cp314-win_amd64.whl", hash = "sha256:d1ea02fa8ab3d33eb1125eade81f7136341eb429152c6dbe2ae6f8bc33b3fbdd", size = 672145, upload-time = "2026-08-16T22:54:24.831Z" }, + { url = "https://files.pythonhosted.org/packages/f9/ba/f7bbaae0c789bab7ddb764d2056ee1a463cc95a8acbccc90d4184e48b242/hypothesis-6.165.10-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:ed1a5891e59472884a03cb9875483e8fc131c80a275c60967f8afc5458a0c8ff", size = 783287, upload-time = "2026-08-16T22:54:23.751Z" }, + { url = "https://files.pythonhosted.org/packages/3a/83/01ef80772b4abd335c49405576dc503cede94fb5da30ba2643a119013aea/hypothesis-6.165.10-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:09772e328a26e50486ac572be34f9887f9aa185efe7ebb16bde4e8f6038db1f4", size = 774991, upload-time = "2026-08-16T22:55:25.987Z" }, + { url = "https://files.pythonhosted.org/packages/a3/0b/f47506241f9d5a5a2efe4c65b6bf4830e9d9576e5d3779007a260699e608/hypothesis-6.165.10-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5cf3b612542ba174c9da4000b59a4f4c81e8d66f87509be85d3a1b71b5c36413", size = 1105499, upload-time = "2026-08-16T22:54:51.864Z" }, + { url = "https://files.pythonhosted.org/packages/84/fe/abb3909b7089835112fbe75bf00d817d733b3a8032759783db0a24ff1e56/hypothesis-6.165.10-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f69ec5be85ef508e206153bed8eafd03f7995dc464356c8bbb279a1e2b7d56f3", size = 1155685, upload-time = "2026-08-16T22:54:30.94Z" }, + { url = "https://files.pythonhosted.org/packages/73/2f/1964738921640184067121ae77414522fc3f0463fc26c6e25a4f3b8e42ca/hypothesis-6.165.10-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:dd207497bb985918409a1bb5db85d1875f74e1269487332113b73d1ee7c77647", size = 1279177, upload-time = "2026-08-16T22:54:40.179Z" }, + { url = "https://files.pythonhosted.org/packages/34/c5/312af8ae038d3af9cf3f7f1021c1abfe31c0d9035e4cf63519e0a7dc983e/hypothesis-6.165.10-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:00de0abdcf8c05c9d0eab735a3c49a276376b55151e6fcb903c2b39a90e5e5c3", size = 1322921, upload-time = "2026-08-16T22:54:42.7Z" }, + { url = "https://files.pythonhosted.org/packages/9e/e7/b0a2fde7570c090a1b914026266a421c751ef10138fffe37fe0ef9e675c0/hypothesis-6.165.10-cp314-cp314t-win_amd64.whl", hash = "sha256:cc2da5aa4edf14743fa9257e5ba3513963999f01211635702479d8e92b8207c8", size = 672147, upload-time = "2026-08-16T22:55:27.527Z" }, + { url = "https://files.pythonhosted.org/packages/47/fd/985aa564d6ffd06483d45a62b40d319df0a703cd8bc1d041de17d102fbaa/hypothesis-6.165.10-cp315-abi3.abi3t-macosx_10_12_x86_64.whl", hash = "sha256:eeab73050ea58c13dd56e329f594c1dfe32ebd7bb169bbdf4f8ceefbc31ec6b5", size = 782882, upload-time = "2026-08-16T22:55:37.93Z" }, + { url = "https://files.pythonhosted.org/packages/f8/2c/6cc11151e450f72353a490940cd0db704680d07b78dc75dcc9f480e0d0e1/hypothesis-6.165.10-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:4c68e983d0007d014bb01ad4bcbba78bc432c73a1755ff36d5102ceefa18299a", size = 774584, upload-time = "2026-08-16T22:55:51.822Z" }, + { url = "https://files.pythonhosted.org/packages/10/39/ef26fa79c1738dfe9cdb1a3584fb6717d26429ca6c9d011cc4fdf08130c2/hypothesis-6.165.10-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7730d8197086f65d8969a991d6728a1d420a51b19fea06535c896cb43a1e05d0", size = 1104876, upload-time = "2026-08-16T22:54:58.937Z" }, + { url = "https://files.pythonhosted.org/packages/4e/f4/3fcc84e7637f42bf00d987093b9418083ac8db81b87392608a60f4b7c5fd/hypothesis-6.165.10-cp315-abi3.abi3t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7a7980a898a3e6ebe4de1896a0507e3d519edb53fb9b4bda478c9fbeb6514558", size = 1133353, upload-time = "2026-08-16T22:54:28.635Z" }, + { url = "https://files.pythonhosted.org/packages/35/59/21c5c14179c38f8d0de3560e7f1825c083311b3013b63f817d7dc78dfcbd/hypothesis-6.165.10-cp315-abi3.abi3t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b5820d009aedb7ae9cfd32f98b1ab0c0bbd6268379c4fab042218b6b655c63f8", size = 1132300, upload-time = "2026-08-16T22:56:08.539Z" }, + { url = "https://files.pythonhosted.org/packages/14/af/fbb56059961e416b2de7b9dc5352db2e8572bd5ea46892957e4c1e5548ab/hypothesis-6.165.10-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37a7ac3d34220800e1107871cc391bca1b00439875925d7d821878b8b791f245", size = 1155175, upload-time = "2026-08-16T22:55:19.824Z" }, + { url = "https://files.pythonhosted.org/packages/0f/53/77fb0c2dad445858555429c4e06cf94a59ae8d2407dd6426b5af97c84828/hypothesis-6.165.10-cp315-abi3.abi3t-manylinux_2_31_riscv64.whl", hash = "sha256:dafa7c9dbe3d802f9bcdf261b29c8a70700fb22839947f06e471f62c46b6257f", size = 1109881, upload-time = "2026-08-16T22:55:32.029Z" }, + { url = "https://files.pythonhosted.org/packages/a8/7b/d187f673ff30e6ada640953636f978ffe64a6332f756b64163c2277f8d0c/hypothesis-6.165.10-cp315-abi3.abi3t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:90915635b9648071129b0f72c0673cf8eac9eb84cfd445c5bedef30c714b1ec2", size = 1144963, upload-time = "2026-08-16T22:56:13.428Z" }, + { url = "https://files.pythonhosted.org/packages/e0/60/31d504e364134d60af23e5f6365db0da3cf4a51b3ed3d4836e5a2cff12cf/hypothesis-6.165.10-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:e1bbeb7c506b07ee0422cf9b2f7212fefa4240957f03526d38d27bc6743a0a48", size = 1278684, upload-time = "2026-08-16T22:55:22.971Z" }, + { url = "https://files.pythonhosted.org/packages/ef/e6/89d26834a08c02f8da149e541dd40d7a96f68d9722f43146e69a77436ed7/hypothesis-6.165.10-cp315-abi3.abi3t-musllinux_1_2_armv7l.whl", hash = "sha256:2b36aaffc88625a44f91074c5bbedfdefb9b376c38d1b3c342edcd2e4c8ed16c", size = 1407202, upload-time = "2026-08-16T22:55:14.949Z" }, + { url = "https://files.pythonhosted.org/packages/dc/61/20d1e72246867ea195440092e8bb422c7ddc2f271b87b5b65679d5532719/hypothesis-6.165.10-cp315-abi3.abi3t-musllinux_1_2_ppc64le.whl", hash = "sha256:18a3ea838ddea183388f8788750afa8494d79abb5358823be9782585f34445d3", size = 1261395, upload-time = "2026-08-16T22:56:05.448Z" }, + { url = "https://files.pythonhosted.org/packages/2a/9b/ebab6c3c2b90a16abb4119198178652d12aff83cc8ec2cfde5276c69fb1e/hypothesis-6.165.10-cp315-abi3.abi3t-musllinux_1_2_riscv64.whl", hash = "sha256:2a2567b3a03a4a5a7c575c191cfcce321a967df3727803817e75bffbbeaecabe", size = 1279213, upload-time = "2026-08-16T22:55:35.066Z" }, + { url = "https://files.pythonhosted.org/packages/23/78/69b219b524231d36eb20c792e1f01e7cb037e02bd0af1c29f77ed9a969c0/hypothesis-6.165.10-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:8001925fa3dde51cb574e4c9de4c7efe77c4e4d64bd2fd2ef61d5651f9d04f3d", size = 1322367, upload-time = "2026-08-16T22:54:21.279Z" }, + { url = "https://files.pythonhosted.org/packages/55/63/ad5cc153dcc72ae5e7905fb9b3585f3e48ce892a2d6366f90163e867a69d/hypothesis-6.165.10-cp315-abi3.abi3t-win32.whl", hash = "sha256:c6559380469295c4009215fe1cab561301591a3bee2e2fb3f4f96d2273a3affc", size = 666038, upload-time = "2026-08-16T22:56:11.797Z" }, + { url = "https://files.pythonhosted.org/packages/80/32/b62307b73fbc99f0a4381d6f9456df76fbcbb7a27ef7256e26f0376f48ea/hypothesis-6.165.10-cp315-abi3.abi3t-win_amd64.whl", hash = "sha256:30797f20ca45e57f526d2df872f63ba453cb4e1091ad542184a7a951af8da79d", size = 671941, upload-time = "2026-08-16T22:55:00.235Z" }, + { url = "https://files.pythonhosted.org/packages/c2/dd/e0f98add0548ef73ea7afac45da1fb8efc854d7f9931db568754d0f963f3/hypothesis-6.165.10-cp315-abi3.abi3t-win_arm64.whl", hash = "sha256:c53e9b1c36350df9965ec44d6c0d4e0bbbb38f720dd2b0e1256dc6524d411015", size = 669931, upload-time = "2026-08-16T22:55:50.205Z" }, +] + [[package]] name = "idna" version = "3.18" @@ -388,6 +460,7 @@ lint = [ ] test = [ { name = "httpx" }, + { name = "hypothesis" }, { name = "pytest" }, { name = "pytest-cov" }, ] @@ -405,6 +478,7 @@ requires-dist = [ lint = [{ name = "ruff", specifier = ">=0.6.0" }] test = [ { name = "httpx", specifier = ">=0.27.0,<0.29.0" }, + { name = "hypothesis", specifier = ">=6.100.0" }, { name = "pytest", specifier = ">=8.3.0,<9.0.0" }, { name = "pytest-cov", specifier = ">=6.0.0" }, ] @@ -648,6 +722,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, ] +[[package]] +name = "sortedcontainers" +version = "2.4.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e8/c4/ba2f8066cceb6f23394729afe52f3bf7adec04bf9ed2c820b39e19299111/sortedcontainers-2.4.0.tar.gz", hash = "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88", size = 30594, upload-time = "2021-05-16T22:03:42.897Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/32/46/9cb0e58b2deb7f82b84065f37f3bffeb12413f947f9388e4cac22c4621ce/sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0", size = 29575, upload-time = "2021-05-16T22:03:41.177Z" }, +] + [[package]] name = "starlette" version = "1.3.1"