pytest-databases 0.16.0__tar.gz → 0.17.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/.github/workflows/ci.yaml +1 -1
  2. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/.pre-commit-config.yaml +1 -1
  3. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/PKG-INFO +1 -1
  4. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/postgres.rst +2 -1
  5. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/pyproject.toml +2 -2
  6. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/mongodb.py +1 -2
  7. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/postgres.py +42 -0
  8. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_postgres.py +2 -0
  9. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/uv.lock +1095 -793
  10. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/.github/CODEOWNERS +0 -0
  11. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/.github/dependabot.yaml +0 -0
  12. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/.github/workflows/cd.yaml +0 -0
  13. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/.github/workflows/docs.yml +0 -0
  14. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/.github/workflows/pr-title.yaml +0 -0
  15. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/.github/workflows/release.yaml +0 -0
  16. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/.gitignore +0 -0
  17. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/.sourcery.yaml +0 -0
  18. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/.vscode/launch.json +0 -0
  19. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/.vscode/settings.json +0 -0
  20. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/CODEOWNERS +0 -0
  21. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/CONTRIBUTING.rst +0 -0
  22. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/LICENSE +0 -0
  23. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/Makefile +0 -0
  24. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/README.md +0 -0
  25. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/.gitignore +0 -0
  26. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/__init__.py +0 -0
  27. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/_static/.gitkeep +0 -0
  28. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/_static/custom.css +0 -0
  29. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/_static/logo.svg +0 -0
  30. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/changelog.rst +0 -0
  31. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/conf.py +0 -0
  32. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/contribution-guide.rst +0 -0
  33. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/getting-started/basic-usage.rst +0 -0
  34. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/getting-started/configuration.rst +0 -0
  35. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/getting-started/enabling-plugins.rst +0 -0
  36. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/getting-started/index.rst +0 -0
  37. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/getting-started/installation.rst +0 -0
  38. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/getting-started/next-steps.rst +0 -0
  39. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/index.rst +0 -0
  40. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/azure_blob_storage.rst +0 -0
  41. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/bigquery.rst +0 -0
  42. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/cockroachdb.rst +0 -0
  43. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/elasticsearch.rst +0 -0
  44. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/gizmosql.rst +0 -0
  45. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/index.rst +0 -0
  46. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/mariadb.rst +0 -0
  47. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/minio.rst +0 -0
  48. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/mongodb.rst +0 -0
  49. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/mysql.rst +0 -0
  50. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/oracle.rst +0 -0
  51. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/redis.rst +0 -0
  52. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/spanner.rst +0 -0
  53. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/sqlserver.rst +0 -0
  54. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/valkey.rst +0 -0
  55. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/docs/supported-databases/yugabyte.rst +0 -0
  56. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/scripts/__init__.py +0 -0
  57. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/scripts/build_docs.py +0 -0
  58. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/scripts/convert_docs.sh +0 -0
  59. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/scripts/install-hatch.sh +0 -0
  60. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/sonar-project.properties +0 -0
  61. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/__init__.py +0 -0
  62. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/__metadata__.py +0 -0
  63. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/_service.py +0 -0
  64. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/__init__.py +0 -0
  65. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/azure_blob.py +0 -0
  66. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/bigquery.py +0 -0
  67. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/cockroachdb.py +0 -0
  68. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/elastic_search.py +0 -0
  69. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/gizmosql.py +0 -0
  70. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/mariadb.py +0 -0
  71. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/minio.py +0 -0
  72. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/mssql.py +0 -0
  73. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/mysql.py +0 -0
  74. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/oracle.py +0 -0
  75. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/redis.py +0 -0
  76. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/spanner.py +0 -0
  77. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/valkey.py +0 -0
  78. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/docker/yugabyte.py +0 -0
  79. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/helpers.py +0 -0
  80. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/py.typed +0 -0
  81. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/src/pytest_databases/types.py +0 -0
  82. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/__init__.py +0 -0
  83. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/conftest.py +0 -0
  84. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_azure_blob.py +0 -0
  85. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_bigquery.py +0 -0
  86. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_cockroachdb.py +0 -0
  87. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_elasticsearch.py +0 -0
  88. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_gizmosql.py +0 -0
  89. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_mariadb.py +0 -0
  90. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_minio.py +0 -0
  91. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_mongodb.py +0 -0
  92. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_mssql.py +0 -0
  93. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_mysql.py +0 -0
  94. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_oracle.py +0 -0
  95. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_redis.py +0 -0
  96. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_spanner.py +0 -0
  97. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_valkey.py +0 -0
  98. {pytest_databases-0.16.0 → pytest_databases-0.17.0}/tests/test_yugabyte.py +0 -0
@@ -51,7 +51,7 @@ jobs:
51
51
  run: uv run pytest --cdist-group=${{ matrix.cdist-group }}/3 -k "not elasticsearch"
52
52
 
53
53
  - if: matrix.python-version == '3.12'
54
- uses: actions/upload-artifact@v6
54
+ uses: actions/upload-artifact@v7
55
55
  with:
56
56
  name: coverage-xml
57
57
  path: coverage.xml
@@ -19,7 +19,7 @@ repos:
19
19
 
20
20
  # Ruff replaces black, flake8, autoflake and isort
21
21
  - repo: https://github.com/charliermarsh/ruff-pre-commit
22
- rev: "v0.14.13" # make sure this is always consistent with hatch configs
22
+ rev: "v0.15.5" # make sure this is always consistent with hatch configs
23
23
  hooks:
24
24
  - id: ruff
25
25
  args: [--config, ./pyproject.toml]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-databases
3
- Version: 0.16.0
3
+ Version: 0.17.0
4
4
  Summary: Reusable database fixtures for any and all databases.
5
5
  Project-URL: Documentation, https://github.com/litestar-org/pytest-databases#readme
6
6
  Project-URL: Issues, https://github.com/litestar-org/pytest-databases/issues
@@ -1,7 +1,7 @@
1
1
  PostgreSQL
2
2
  ==========
3
3
 
4
- Integration with `PostgreSQL <https://www.postgresql.org/>`_ using the `PostgreSQL Docker Image <https://hub.docker.com/_/postgres>`_, Google's `AlloyDB Omni <https://cloud.google.com/alloydb/omni?hl=en>`_ or `pgvector Docker Image <https://hub.docker.com/r/ankane/pgvector>`_
4
+ Integration with `PostgreSQL <https://www.postgresql.org/>`_ using the `PostgreSQL Docker Image <https://hub.docker.com/_/postgres>`_, Google's `AlloyDB Omni <https://cloud.google.com/alloydb/omni?hl=en>`_, `pgvector Docker Image <https://hub.docker.com/r/ankane/pgvector>`_, or `ParadeDB Docker Image <https://hub.docker.com/r/paradedb/paradedb>`_
5
5
 
6
6
  Installation
7
7
  ------------
@@ -56,6 +56,7 @@ The following version-specific fixtures are also available:
56
56
  * ``postgres_17_image``, ``postgres_17_service``, ``postgres_17_connection``: PostgreSQL 17.x
57
57
  * ``postgres_18_image``, ``postgres_18_service``, ``postgres_18_connection``: PostgreSQL 18.x
58
58
  * ``pgvector_image``, ``pgvector_service``. ``pgvector_connection``: Latest Available pgvector Docker image.
59
+ * ``paradedb_image``, ``paradedb_service``, ``paradedb_connection``: ParadeDB (PostgreSQL with BM25 full-text search and analytics extensions).
59
60
 
60
61
  Configuration
61
62
  -------------
@@ -12,7 +12,7 @@ license = "MIT"
12
12
  name = "pytest-databases"
13
13
  readme = "README.md"
14
14
  requires-python = ">=3.9"
15
- version = "0.16.0"
15
+ version = "0.17.0"
16
16
  #
17
17
  authors = [{ name = "Cody Fincher", email = "cody@litestar.dev" }]
18
18
  keywords = [
@@ -138,7 +138,7 @@ test = [
138
138
  allow_dirty = true
139
139
  commit = false
140
140
  commit_args = "--no-verify"
141
- current_version = "0.16.0"
141
+ current_version = "0.17.0"
142
142
  ignore_missing_files = false
143
143
  ignore_missing_version = false
144
144
  message = "chore(release): bump to `v{new_version}`"
@@ -135,8 +135,7 @@ def mongodb_database(
135
135
  Yields:
136
136
  A MongoDB database instance.
137
137
  """
138
- db = mongodb_connection[mongodb_service.database]
139
- yield db
138
+ yield mongodb_connection[mongodb_service.database]
140
139
  # For a truly clean state per test, you might consider dropping the database here,
141
140
  # but it depends on the desired test isolation and speed.
142
141
  # e.g., mongodb_connection.drop_database(mongodb_service.database)
@@ -476,6 +476,48 @@ def pgvector_connection(
476
476
  yield conn
477
477
 
478
478
 
479
+ @pytest.fixture(autouse=False, scope="session")
480
+ def paradedb_image() -> str:
481
+ return "paradedb/paradedb:0.21.5-pg16"
482
+
483
+
484
+ @pytest.fixture(autouse=False, scope="session")
485
+ def paradedb_service(
486
+ docker_service: DockerService,
487
+ paradedb_image: str,
488
+ xdist_postgres_isolation_level: XdistIsolationLevel,
489
+ postgres_host: str,
490
+ postgres_user: str,
491
+ postgres_password: str,
492
+ ) -> Generator[PostgresService, None, None]:
493
+ with _provide_postgres_service(
494
+ docker_service,
495
+ image=paradedb_image,
496
+ name="paradedb",
497
+ xdist_postgres_isolate=xdist_postgres_isolation_level,
498
+ host=postgres_host,
499
+ user=postgres_user,
500
+ password=postgres_password,
501
+ ) as service:
502
+ yield service
503
+
504
+
505
+ @pytest.fixture(autouse=False, scope="session")
506
+ def paradedb_connection(
507
+ paradedb_service: PostgresService,
508
+ ) -> Generator[psycopg.Connection, None, None]:
509
+ with psycopg.connect(
510
+ _make_connection_string(
511
+ host=paradedb_service.host,
512
+ port=paradedb_service.port,
513
+ user=paradedb_service.user,
514
+ password=paradedb_service.password,
515
+ database=paradedb_service.database,
516
+ ),
517
+ ) as conn:
518
+ yield conn
519
+
520
+
479
521
  @pytest.fixture(autouse=False, scope="session")
480
522
  def alloydb_omni_image() -> str:
481
523
  return "google/alloydbomni:16"
@@ -16,6 +16,7 @@ import pytest
16
16
  "postgres_18_service",
17
17
  "alloydb_omni_service",
18
18
  "pgvector_service",
19
+ "paradedb_service",
19
20
  ],
20
21
  )
21
22
  def test_service_fixture(pytester: pytest.Pytester, service_fixture: str) -> None:
@@ -61,6 +62,7 @@ def test_service_fixture(pytester: pytest.Pytester, service_fixture: str) -> Non
61
62
  "postgres_18_connection",
62
63
  "alloydb_omni_connection",
63
64
  "pgvector_connection",
65
+ "paradedb_connection",
64
66
  ],
65
67
  )
66
68
  def test_startup_connection_fixture(pytester: pytest.Pytester, connection_fixture: str) -> None: