"""Shared pytest fixtures for the meshnet test suite.""" import pytest @pytest.fixture(autouse=True) def _stub_benchmark_throughput(monkeypatch): """Replace the GEMM benchmark with a fixed value in all tests. The benchmark runs 60 matmuls (warmup + measure) which adds ~100ms per test on CPU. Tests verify registration flow, not hardware speed — stub it out. Tests that specifically exercise benchmark_throughput import it directly from meshnet_node.hardware and are not affected by this patch. """ try: import meshnet_node.startup as startup_mod monkeypatch.setattr(startup_mod, "benchmark_throughput_checked", lambda _device: (999.0, True, None)) except ImportError: pass