mirror of
https://github.com/chatmail/relay.git
synced 2026-09-22 07:10:08 +00:00
test!: remove global registration of pytest plugins
Instead a conftest.py close to the test files needs to opt into using plugin hooks and fixtures. also remove some packaging leftover with initenv.sh
This commit is contained in:
@@ -27,9 +27,6 @@ chatmail-quota-expire = "chatmaild.expire:quota_expire_main"
|
|||||||
chatmail-fsreport = "chatmaild.fsreport:main"
|
chatmail-fsreport = "chatmaild.fsreport:main"
|
||||||
lastlogin = "chatmaild.lastlogin:main"
|
lastlogin = "chatmaild.lastlogin:main"
|
||||||
|
|
||||||
[project.entry-points.pytest11]
|
|
||||||
"chatmaild.testplugin" = "chatmaild.tests.plugin"
|
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
addopts = "-v -ra --strict-markers"
|
addopts = "-v -ra --strict-markers"
|
||||||
log_format = "%(asctime)s %(levelname)s %(message)s"
|
log_format = "%(asctime)s %(levelname)s %(message)s"
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
"""Opt in to the chatmaild fixtures, which are not registered globally."""
|
||||||
|
|
||||||
|
from chatmaild.tests.plugin import * # noqa: F403
|
||||||
@@ -27,9 +27,6 @@ dependencies = [
|
|||||||
[project.scripts]
|
[project.scripts]
|
||||||
cmdeploy = "cmdeploy.cmdeploy:main"
|
cmdeploy = "cmdeploy.cmdeploy:main"
|
||||||
|
|
||||||
[project.entry-points.pytest11]
|
|
||||||
"cmdeploy.testplugin" = "cmdeploy.tests.plugin"
|
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
addopts = "-v -ra --strict-markers"
|
addopts = "-v -ra --strict-markers"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
"""Run the lua scripts we ship under lupa, which bundles Lua 5.4 like dovecot."""
|
"""Run the lua scripts we ship under lupa, which bundles Lua 5.4 like dovecot."""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from chatmaild.tests.plugin import * # noqa: F403
|
||||||
from lupa import lua54
|
from lupa import lua54
|
||||||
|
|
||||||
from cmdeploy.basedeploy import get_resource
|
from cmdeploy.basedeploy import get_resource
|
||||||
|
from cmdeploy.tests.plugin import * # noqa: F403
|
||||||
|
|
||||||
|
|
||||||
class Lua:
|
class Lua:
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ fi
|
|||||||
|
|
||||||
python3 -m venv --upgrade-deps venv
|
python3 -m venv --upgrade-deps venv
|
||||||
|
|
||||||
|
# an editable install puts src/ on sys.path, so a leftover egg-info there is
|
||||||
|
# found as a second distribution and keeps removed entry points registered
|
||||||
|
rm -rf chatmaild/src/*.egg-info cmdeploy/src/*.egg-info
|
||||||
|
|
||||||
venv/bin/pip install -e chatmaild
|
venv/bin/pip install -e chatmaild
|
||||||
venv/bin/pip install -e cmdeploy
|
venv/bin/pip install -e cmdeploy
|
||||||
venv/bin/pip install sphinx sphinxcontrib-mermaid sphinx-autobuild furo # for building the docs
|
venv/bin/pip install sphinx sphinxcontrib-mermaid sphinx-autobuild furo # for building the docs
|
||||||
|
|||||||
Reference in New Issue
Block a user