Skip to content

Commit 7cb3e83

Browse files
authored
Merge pull request #1294 from tboy1337/editable-package
Update workflows to use pipenv-setup@v4.4.0 with editable flag
2 parents 0e0b2e2 + b62ef52 commit 7cb3e83

5 files changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/dockerised-postgres.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,15 @@ jobs:
4949

5050
steps:
5151
- uses: actions/checkout@v6
52-
- name: Run test noproc fixture on docker
53-
uses: fizyk/actions-reuse/.github/actions/pipenv@v4.4.4
52+
- name: Set up Pipenv on python ${{ matrix.python-version }}
53+
uses: fizyk/actions-reuse/.github/actions/pipenv-setup@v4.4.4
5454
with:
5555
python-version: ${{ matrix.python-version }}
56-
command: pytest -n 0 --max-worker-restart 0 -k docker --postgresql-host=localhost --postgresql-port 5433 --postgresql-password=postgres --cov-report=xml:coverage-docker.xml
5756
allow-prereleases: true
57+
- name: Run test noproc fixture on docker
58+
uses: fizyk/actions-reuse/.github/actions/pipenv-run@v4.4.4
59+
with:
60+
command: pytest -n 0 --max-worker-restart 0 -k docker --postgresql-host=localhost --postgresql-port 5433 --postgresql-password=postgres --cov-report=xml:coverage-docker.xml
5861
- name: Upload coverage to Codecov
5962
uses: codecov/codecov-action@v6.0.0
6063
with:

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ port-for = "==1.0.0"
99
mirakuru = "==3.0.2"
1010
packaging = "==26.0"
1111
psycopg = "==3.3.3"
12+
pytest-postgresql = {path = ".", editable = true}
1213

1314
[dev-packages]
1415
towncrier = "==25.8.0"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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)