Skip to content

Commit d580b5a

Browse files
committed
test(msgspec): migrate test_msgspec from contrib to canonical location
Move tests/unit/test_contrib/test_msgspec.py to tests/unit/test_dto/ since the test file already imports from the canonical ``litestar.dto`` namespace. The orphaned ``int_factory`` fixture moves to tests/unit/test_dto/conftest.py (its only consumer was test_msgspec.py); the now-empty tests/unit/test_contrib/conftest.py is removed. Refs #4723
1 parent b9d8c2f commit d580b5a

3 files changed

Lines changed: 6 additions & 14 deletions

File tree

tests/unit/test_contrib/conftest.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/unit/test_dto/conftest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from collections.abc import Collection, Generator
3+
from collections.abc import Callable, Collection, Generator
44
from typing import Any, TypeVar, get_type_hints
55

66
import pytest
@@ -19,6 +19,11 @@
1919
T = TypeVar("T", bound=Model)
2020

2121

22+
@pytest.fixture
23+
def int_factory() -> Callable[[], int]:
24+
return lambda: 2
25+
26+
2227
@pytest.fixture
2328
def ModelDataDTO(use_experimental_dto_backend: bool) -> type[AbstractDTO]:
2429
class DTOCls(AbstractDTO[Model]):

0 commit comments

Comments
 (0)