From 3e96db783a23fbcdb638476b9471b03c13ca2dd1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 02:23:31 +0000 Subject: [PATCH 1/2] build(deps): bump pytest from 8.4.2 to 9.0.0 Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.4.2 to 9.0.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.4.2...9.0.0) --- updated-dependencies: - dependency-name: pytest dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 9fd027cb..f60f8f63 100644 --- a/Pipfile +++ b/Pipfile @@ -4,7 +4,7 @@ verify_ssl = true name = "pypi" [packages] -pytest = "==8.4.2" +pytest = "==9.0.0" port-for = "==1.0.0" mirakuru = "==3.0.1" packaging = "==25.0" From 3b0a6eb7517a8490b05671139f533ef69d69fe38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20=C5=9Aliwi=C5=84ski?= Date: Fri, 28 Nov 2025 16:23:02 +0100 Subject: [PATCH 2/2] Move pytest configuration to native toml --- .github/workflows/oldest-postgres.yml | 4 ++-- .github/workflows/single-postgres.yml | 4 ++-- README.rst | 2 +- newsfragments/1218.misc.rst | 1 + pyproject.oldest.toml | 6 ++++++ pyproject.toml | 10 +++++----- 6 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 newsfragments/1218.misc.rst create mode 100644 pyproject.oldest.toml diff --git a/.github/workflows/oldest-postgres.yml b/.github/workflows/oldest-postgres.yml index 19436aca..a0e536da 100644 --- a/.github/workflows/oldest-postgres.yml +++ b/.github/workflows/oldest-postgres.yml @@ -61,11 +61,11 @@ jobs: - name: Run tests without xdist uses: fizyk/actions-reuse/.github/actions/pipenv-run@v4.1.1 with: - command: py.test -svv -p no:xdist --postgresql-exec="/usr/lib/postgresql/${{ inputs.postgresql }}/bin/pg_ctl" -k "not docker" --cov-report=xml + command: pytest -c pyproject.oldest.toml -svv -p no:xdist --postgresql-exec="/usr/lib/postgresql/${{ inputs.postgresql }}/bin/pg_ctl" -k "not docker" --cov-report=xml - name: Run xdist test uses: fizyk/actions-reuse/.github/actions/pipenv-run@v4.1.1 with: - command: py.test -n auto --dist loadgroup --max-worker-restart 0 --postgresql-exec="/usr/lib/postgresql/${{ inputs.postgresql }}/bin/pg_ctl" -k "not docker" --cov-report=xml:coverage-xdist.xml + command: pytest -n auto -c pyproject.oldest.toml --dist loadgroup --max-worker-restart 0 --postgresql-exec="/usr/lib/postgresql/${{ inputs.postgresql }}/bin/pg_ctl" -k "not docker" --cov-report=xml:coverage-xdist.xml - uses: actions/upload-artifact@v5 if: failure() with: diff --git a/.github/workflows/single-postgres.yml b/.github/workflows/single-postgres.yml index 9f4c1a6c..e67b66ee 100644 --- a/.github/workflows/single-postgres.yml +++ b/.github/workflows/single-postgres.yml @@ -56,11 +56,11 @@ jobs: - name: Run test uses: fizyk/actions-reuse/.github/actions/pipenv-run@v4.1.1 with: - command: py.test -svv -p no:xdist --postgresql-exec="/usr/lib/postgresql/${{ inputs.postgresql }}/bin/pg_ctl" -k "not docker" --cov-report=xml + command: pytest -svv -p no:xdist --postgresql-exec="/usr/lib/postgresql/${{ inputs.postgresql }}/bin/pg_ctl" -k "not docker" --cov-report=xml - name: Run xdist test uses: fizyk/actions-reuse/.github/actions/pipenv-run@v4.1.1 with: - command: py.test -n auto --dist loadgroup --max-worker-restart 0 --postgresql-exec="/usr/lib/postgresql/${{ inputs.postgresql }}/bin/pg_ctl" -k "not docker" --cov-report=xml:coverage-xdist.xml + command: pytest -n auto --dist loadgroup --max-worker-restart 0 --postgresql-exec="/usr/lib/postgresql/${{ inputs.postgresql }}/bin/pg_ctl" -k "not docker" --cov-report=xml:coverage-xdist.xml - uses: actions/upload-artifact@v5 if: failure() with: diff --git a/README.rst b/README.rst index 3e67c7ae..1a06850a 100644 --- a/README.rst +++ b/README.rst @@ -254,7 +254,7 @@ Example usage: .. code-block:: sh - py.test tests --postgresql-port=8888 + pytest tests --postgresql-port=8888 * specify your port as ``postgresql_port`` in your ``pytest.ini`` file. diff --git a/newsfragments/1218.misc.rst b/newsfragments/1218.misc.rst new file mode 100644 index 00000000..0941f0ec --- /dev/null +++ b/newsfragments/1218.misc.rst @@ -0,0 +1 @@ +Update pytest configuration to toml-native diff --git a/pyproject.oldest.toml b/pyproject.oldest.toml new file mode 100644 index 00000000..f1f4732f --- /dev/null +++ b/pyproject.oldest.toml @@ -0,0 +1,6 @@ +[tool.pytest.ini_options] +xfail_strict=true +addopts = "--showlocals --verbose --cov" +testpaths = "tests" +pytester_example_dir = "tests/examples" +norecursedirs = "examples" diff --git a/pyproject.toml b/pyproject.toml index 19b50c29..28ffad42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,12 +56,12 @@ include = ["pytest_postgresql*"] exclude = ["tests*"] namespaces = false -[tool.pytest.ini_options] -xfail_strict=true -addopts = "--showlocals --verbose --cov" -testpaths = "tests" +[tool.pytest] +strict_xfail=true +addopts = ["--showlocals", "--verbose", "--cov"] +testpaths = ["tests"] pytester_example_dir = "tests/examples" -norecursedirs = "examples" +norecursedirs = ["examples"] [tool.ruff] line-length = 120