mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 22:27:01 +01:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWYcmik6APnHfc9gEVy
15 lines
425 B
Python
15 lines
425 B
Python
"""Keep the optional focus tracker out of every test unless a test fakes it."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
from typing import Any, cast
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def _no_real_focus_tracker(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
"""Make ``import focus_project`` fail, so no test writes live activity."""
|
|
monkeypatch.setitem(sys.modules, "focus_project", cast("Any", None))
|