Skip to content

Commit b62ef52

Browse files
committed
Remove duplicate plugin registration to fix editable install errors - With pytest-postgresql installed editably via Pipfile, the plugin is auto-registered through entry points. Remove the wildcard import from tests/conftest.py and the makeconftest call from pointed_pytester that caused duplicate plugin registration errors (fizyk requested in PR 1294)
Made-with: Cursor
1 parent f43cd41 commit b62ef52

3 files changed

Lines changed: 1 addition & 3 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Add ``pytest-postgresql`` as an editable self-install in the Pipfile, removing the need for the ``editable: true`` option in CI workflow steps.
1+
Add ``pytest-postgresql`` as an editable self-install in the Pipfile; remove the manual ``from pytest_postgresql.plugin import *`` import from ``tests/conftest.py`` and the ``makeconftest`` call in ``tests/test_postgres_options_plugin.py`` that re-registered the plugin and caused duplicate-plugin errors under editable install.

tests/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from pathlib import Path
55

66
from pytest_postgresql import factories
7-
from pytest_postgresql.plugin import * # noqa: F403,F401
87

98
pytest_plugins = ["pytester"]
109
POSTGRESQL_VERSION = os.environ.get("POSTGRES", "13")

tests/test_postgres_options_plugin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def pointed_pytester(pytester: Pytester) -> Pytester:
1919
pytest_postgresql_path = Path(pytest_postgresql.__file__)
2020
root_path = pytest_postgresql_path.parent.parent
2121
pytester.syspathinsert(root_path)
22-
pytester.makeconftest("from pytest_postgresql.plugin import *\n")
2322
return pytester
2423

2524

0 commit comments

Comments
 (0)