-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconftest.py
More file actions
24 lines (19 loc) · 562 Bytes
/
conftest.py
File metadata and controls
24 lines (19 loc) · 562 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# ruff: noqa: D100
from __future__ import annotations
from typing import Any
import pytest
import tcod.ecs
@pytest.fixture(autouse=True)
def _add_registry_entity(doctest_namespace: dict[str, Any]) -> None:
"""Add registry and entity objects to all doctests."""
registry = tcod.ecs.Registry()
entity = registry["entity"]
other_entity = registry["other"]
doctest_namespace.update(
{
"tcod": tcod,
"registry": registry,
"entity": entity,
"other_entity": other_entity,
}
)