diff --git a/pyproject.toml b/pyproject.toml index f0f0e83..2a4d96d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -146,6 +146,12 @@ ignore = [ asyncio_mode = "auto" testpaths = ["tests"] addopts = "--tb=short -q" +# Make the tests/ directory importable as a top-level package so +# tests can use `from tests.conftest import BASE_URL`. Without this, +# `from tests.conftest` raises ModuleNotFoundError on Python 3.10/3.11 +# because pytest's rootdir discovery lands on the repo root rather +# than the tests/ directory. +pythonpath = ["."] [tool.coverage.run] source = ["src/nullrun"] diff --git a/src/nullrun/runtime.py b/src/nullrun/runtime.py index b611f68..5899812 100644 --- a/src/nullrun/runtime.py +++ b/src/nullrun/runtime.py @@ -40,7 +40,7 @@ import uuid from collections import defaultdict, deque from dataclasses import dataclass, field -from typing import Any, Optional +from typing import Any, Callable, Optional import httpx