Skip to content

Commit

Permalink
Moving pytest plugin into the package namespace (#30)
Browse files Browse the repository at this point in the history
This is neater, and is possible now #29 is merged.
  • Loading branch information
etianen authored Jan 27, 2024
1 parent aa171e7 commit 003a0f8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
19 changes: 0 additions & 19 deletions _logot_pytest.py

This file was deleted.

13 changes: 13 additions & 0 deletions logot/_pytest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from __future__ import annotations

from collections.abc import Generator

import pytest

from logot._logot import Logot


@pytest.fixture()
def logot() -> Generator[Logot, None, None]:
with Logot().capturing() as logot:
yield logot
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ classifiers = [
"Topic :: System :: Logging",
"Typing :: Typed",
]
packages = [{ include = "logot" }, { include = "_logot_pytest.py" }]
packages = [{ include = "logot" }]

[tool.poetry.dependencies]
python = "^3.8"
Expand All @@ -43,7 +43,7 @@ sphinx = { version = "7.2.6", markers = "python_version >= '3.12'" }
sphinx-autobuild = { version = "*", markers = "python_version >= '3.12'" }

[tool.poetry.plugins.pytest11]
logot = "_logot_pytest"
logot = "logot._pytest"

[tool.coverage.run]
source = ["logot", "tests"]
Expand Down

0 comments on commit 003a0f8

Please sign in to comment.