Skip to content

Commit df2abf3

Browse files
committed
oops
1 parent 9d74b86 commit df2abf3

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/common/test_tools/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
from common.test_tools.types import AssertMetricFixture, SnapshotFixture
1+
from common.test_tools.types import (
2+
AssertMetricFixture,
3+
RunTasksFixture,
4+
SnapshotFixture,
5+
)
26

37
__all__ = (
48
"AssertMetricFixture",
9+
"RunTasksFixture",
510
"SnapshotFixture",
611
)

src/common/test_tools/types.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
from pathlib import Path
2-
from typing import Protocol
2+
from typing import TYPE_CHECKING, Protocol
33

44
import pytest
55

6+
if TYPE_CHECKING:
7+
from task_processor.models import TaskRun
8+
69

710
class AssertMetricFixture(Protocol):
811
def __call__(
@@ -14,6 +17,13 @@ def __call__(
1417
) -> None: ...
1518

1619

20+
class RunTasksFixture(Protocol):
21+
def __call__(
22+
self,
23+
num_tasks: int,
24+
) -> "list[TaskRun]": ...
25+
26+
1727
class SnapshotFixture(Protocol):
1828
def __call__(self, name: str = "") -> "Snapshot": ...
1929

0 commit comments

Comments
 (0)