pytest-databases 0.20.0b1__tar.gz → 0.20.0b3__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.
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/.github/ci/provider-groups.json +18 -9
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/.github/workflows/docs.yml +1 -1
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/.github/workflows/release.yaml +1 -1
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/PKG-INFO +5 -3
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/README.md +3 -1
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/changelog.rst +181 -30
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/getting-started/configuration.rst +55 -4
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/bigquery.rst +5 -7
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/cockroachdb.rst +12 -10
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/db2.rst +34 -14
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/embedded_postgres.rst +42 -10
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/floci.rst +30 -3
- pytest_databases-0.20.0b3/docs/supported-databases/hardcharger.rst +109 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/index.rst +2 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/mariadb.rst +15 -4
- pytest_databases-0.20.0b3/docs/supported-databases/mongodb.rst +78 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/mysql.rst +16 -4
- pytest_databases-0.20.0b3/docs/supported-databases/oracle.rst +196 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/postgres.rst +94 -10
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/snowflake.rst +16 -4
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/spanner.rst +9 -4
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/sqlserver.rst +15 -3
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/sybase.rst +23 -7
- pytest_databases-0.20.0b3/docs/supported-databases/teradata.rst +61 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/pyproject.toml +5 -3
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/scripts/ci/pull_images.py +10 -2
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/scripts/ci/select_provider_tests.py +52 -7
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/__init__.py +19 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/_service.py +338 -44
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/__init__.py +1 -2
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/azure_blob.py +16 -13
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/bigquery.py +55 -25
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/cockroachdb.py +74 -32
- pytest_databases-0.20.0b3/src/pytest_databases/docker/db2.py +782 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/elastic_search.py +3 -15
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/floci.py +423 -23
- pytest_databases-0.20.0b3/src/pytest_databases/docker/hardcharger.py +209 -0
- pytest_databases-0.20.0b3/src/pytest_databases/docker/mariadb.py +468 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/minio.py +12 -9
- pytest_databases-0.20.0b3/src/pytest_databases/docker/mongodb.py +607 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/mssql.py +287 -72
- pytest_databases-0.20.0b3/src/pytest_databases/docker/mysql.py +532 -0
- pytest_databases-0.20.0b3/src/pytest_databases/docker/oracle.py +2076 -0
- pytest_databases-0.20.0b3/src/pytest_databases/docker/postgres.py +1909 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/rustfs.py +12 -9
- pytest_databases-0.20.0b3/src/pytest_databases/docker/snowflake.py +801 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/spanner.py +133 -18
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/sybase.py +302 -28
- pytest_databases-0.20.0b3/src/pytest_databases/docker/teradata.py +555 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/yugabyte.py +12 -7
- pytest_databases-0.20.0b3/src/pytest_databases/embedded/_pgwire.py +375 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/embedded/postgres.py +212 -16
- pytest_databases-0.20.0b3/src/pytest_databases/helpers.py +1149 -0
- pytest_databases-0.20.0b3/src/pytest_databases/types.py +473 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_azure_blob.py +121 -57
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_bigquery.py +205 -98
- pytest_databases-0.20.0b3/tests/test_ci_provider_groups.py +744 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_cloudflare.py +1 -1
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_cockroachdb.py +128 -3
- pytest_databases-0.20.0b3/tests/test_db2.py +920 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_docker_service.py +535 -43
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_elasticsearch.py +60 -33
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_embedded_postgres.py +596 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_floci.py +352 -54
- pytest_databases-0.20.0b3/tests/test_hardcharger.py +407 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_localstack.py +2 -1
- pytest_databases-0.20.0b3/tests/test_mariadb.py +450 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_minio.py +151 -67
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_mongodb.py +193 -7
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_mssql.py +83 -4
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_mysql.py +241 -15
- pytest_databases-0.20.0b3/tests/test_oracle.py +1964 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_postgres.py +689 -7
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_rustfs.py +196 -114
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_service_ownership.py +163 -2
- pytest_databases-0.20.0b3/tests/test_snowflake.py +718 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_spanner.py +246 -41
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_sybase.py +262 -3
- pytest_databases-0.20.0b3/tests/test_teradata.py +587 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_yugabyte.py +20 -4
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/uv.lock +1 -1
- pytest_databases-0.20.0b1/.github/workflows/cd.yaml +0 -31
- pytest_databases-0.20.0b1/docs/supported-databases/mongodb.rst +0 -57
- pytest_databases-0.20.0b1/docs/supported-databases/oracle.rst +0 -125
- pytest_databases-0.20.0b1/src/pytest_databases/_postgres_templates.py +0 -503
- pytest_databases-0.20.0b1/src/pytest_databases/_s3.py +0 -173
- pytest_databases-0.20.0b1/src/pytest_databases/docker/db2.py +0 -409
- pytest_databases-0.20.0b1/src/pytest_databases/docker/mariadb.py +0 -269
- pytest_databases-0.20.0b1/src/pytest_databases/docker/mongodb.py +0 -213
- pytest_databases-0.20.0b1/src/pytest_databases/docker/mysql.py +0 -330
- pytest_databases-0.20.0b1/src/pytest_databases/docker/oracle.py +0 -1201
- pytest_databases-0.20.0b1/src/pytest_databases/docker/postgres.py +0 -1036
- pytest_databases-0.20.0b1/src/pytest_databases/docker/snowflake.py +0 -423
- pytest_databases-0.20.0b1/src/pytest_databases/embedded/_pgwire.py +0 -193
- pytest_databases-0.20.0b1/src/pytest_databases/helpers.py +0 -218
- pytest_databases-0.20.0b1/src/pytest_databases/types.py +0 -24
- pytest_databases-0.20.0b1/tests/test_ci_provider_groups.py +0 -300
- pytest_databases-0.20.0b1/tests/test_db2.py +0 -433
- pytest_databases-0.20.0b1/tests/test_mariadb.py +0 -248
- pytest_databases-0.20.0b1/tests/test_oracle.py +0 -775
- pytest_databases-0.20.0b1/tests/test_snowflake.py +0 -428
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/.github/CODEOWNERS +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/.github/dependabot.yaml +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/.github/workflows/ci.yaml +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/.github/workflows/pr-title.yaml +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/.gitignore +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/.pre-commit-config.yaml +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/.sourcery.yaml +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/.vscode/launch.json +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/.vscode/settings.json +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/CODEOWNERS +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/CONTRIBUTING.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/LICENSE +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/Makefile +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/.gitignore +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/__init__.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/_static/.gitkeep +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/_static/custom.css +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/_static/logo.svg +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/conf.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/contribution-guide.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/getting-started/basic-usage.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/getting-started/enabling-plugins.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/getting-started/index.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/getting-started/installation.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/getting-started/next-steps.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/index.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/azure_blob_storage.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/cloudflare.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/dolt.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/doltgres.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/elasticsearch.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/gizmosql.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/localstack.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/minio.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/pubsub.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/rabbitmq.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/redis.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/redpanda.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/rustfs.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/sqlanywhere.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/valkey.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/yugabyte.rst +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/scripts/__init__.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/scripts/build_docs.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/scripts/ci/__init__.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/scripts/ci/check_required_jobs.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/scripts/ci/run_tests.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/scripts/convert_docs.sh +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/scripts/install-hatch.sh +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/sonar-project.properties +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/__metadata__.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/cloudflare.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/dolt.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/doltgres.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/gizmosql.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/localstack.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/pubsub.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/rabbitmq.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/redis.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/redpanda.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/sqlanywhere.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/docker/valkey.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/embedded/__init__.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/py.typed +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/src/pytest_databases/runtime.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/__init__.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/conftest.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_dolt.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_doltgres.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_gizmosql.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_pubsub.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_rabbitmq.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_redis.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_redpanda.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_runtime.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_service_host_port.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_sqlanywhere.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tests/test_valkey.py +0 -0
- {pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/tools/scripts/setup-env.sh +0 -0
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
"supported_python_versions": ["3.11", "3.12", "3.13", "3.14", "3.15"],
|
|
4
4
|
"shared_all_provider_paths": [
|
|
5
5
|
"src/pytest_databases/__init__.py",
|
|
6
|
-
"src/pytest_databases/_postgres_templates.py",
|
|
7
|
-
"src/pytest_databases/_s3.py",
|
|
8
6
|
"src/pytest_databases/_service.py",
|
|
9
7
|
"src/pytest_databases/docker/__init__.py",
|
|
10
8
|
"src/pytest_databases/embedded/__init__.py",
|
|
@@ -27,7 +25,6 @@
|
|
|
27
25
|
".github/CODEOWNERS",
|
|
28
26
|
".github/dependabot.yaml",
|
|
29
27
|
".github/release.yml",
|
|
30
|
-
".github/workflows/cd.yaml",
|
|
31
28
|
".github/workflows/docs.yml",
|
|
32
29
|
".github/workflows/pr-title.yaml",
|
|
33
30
|
".github/workflows/release.yaml",
|
|
@@ -57,6 +54,7 @@
|
|
|
57
54
|
"tests/test_elasticsearch.py::test_plugin_imports_without_elasticsearch_clients",
|
|
58
55
|
"tests/test_floci.py::test_plugin_imports_without_cloud_sdks",
|
|
59
56
|
"tests/test_gizmosql.py::test_plugin_imports_without_adbc_driver_flightsql",
|
|
57
|
+
"tests/test_hardcharger.py::test_plugin_imports_without_adbc_driver_hardcharger",
|
|
60
58
|
"tests/test_localstack.py::test_plugin_imports_without_aws_clients",
|
|
61
59
|
"tests/test_mongodb.py::test_plugin_imports_without_pymongo",
|
|
62
60
|
"tests/test_mssql.py::test_plugin_imports_without_pymssql",
|
|
@@ -71,6 +69,7 @@
|
|
|
71
69
|
"tests/test_spanner.py::test_plugin_imports_without_google_cloud_spanner",
|
|
72
70
|
"tests/test_sqlanywhere.py::test_plugin_imports_without_sqlanydb",
|
|
73
71
|
"tests/test_sybase.py::test_plugin_imports_without_sybase_clients",
|
|
72
|
+
"tests/test_teradata.py::test_plugin_imports_without_teradata_clients",
|
|
74
73
|
"tests/test_valkey.py::test_plugin_imports_without_valkey"
|
|
75
74
|
],
|
|
76
75
|
"providers": {
|
|
@@ -83,7 +82,7 @@
|
|
|
83
82
|
"bigquery": {
|
|
84
83
|
"source_globs": ["src/pytest_databases/docker/bigquery.py"],
|
|
85
84
|
"test_paths": ["tests/test_bigquery.py"],
|
|
86
|
-
"images": ["ghcr.io/goccy/bigquery-emulator:
|
|
85
|
+
"images": ["ghcr.io/goccy/bigquery-emulator:0.8.1"],
|
|
87
86
|
"docs_globs": ["docs/supported-databases/bigquery.rst"]
|
|
88
87
|
},
|
|
89
88
|
"cloudflare": {
|
|
@@ -162,6 +161,12 @@
|
|
|
162
161
|
"images": ["gizmodata/gizmosql:latest"],
|
|
163
162
|
"docs_globs": ["docs/supported-databases/gizmosql.rst"]
|
|
164
163
|
},
|
|
164
|
+
"hardcharger": {
|
|
165
|
+
"source_globs": ["src/pytest_databases/docker/hardcharger.py"],
|
|
166
|
+
"test_paths": ["tests/test_hardcharger.py"],
|
|
167
|
+
"images": ["ghcr.io/gizmodata/hardcharger:latest"],
|
|
168
|
+
"docs_globs": ["docs/supported-databases/hardcharger.rst"]
|
|
169
|
+
},
|
|
165
170
|
"localstack": {
|
|
166
171
|
"source_globs": ["src/pytest_databases/docker/localstack.py"],
|
|
167
172
|
"test_paths": ["tests/test_localstack.py"],
|
|
@@ -221,7 +226,7 @@
|
|
|
221
226
|
"images": [
|
|
222
227
|
"gvenzl/oracle-free:23-slim-faststart",
|
|
223
228
|
"gvenzl/oracle-xe:18-slim-faststart",
|
|
224
|
-
"container-registry.oracle.com/database/adb-free:latest-
|
|
229
|
+
"container-registry.oracle.com/database/adb-free:latest-26ai"
|
|
225
230
|
],
|
|
226
231
|
"docs_globs": ["docs/supported-databases/oracle.rst"]
|
|
227
232
|
},
|
|
@@ -304,10 +309,7 @@
|
|
|
304
309
|
"spanner": {
|
|
305
310
|
"source_globs": ["src/pytest_databases/docker/spanner.py"],
|
|
306
311
|
"test_paths": ["tests/test_spanner.py"],
|
|
307
|
-
"images": [
|
|
308
|
-
"gcr.io/cloud-spanner-emulator/emulator:latest",
|
|
309
|
-
"gcr.io/google.com/cloudsdktool/cloud-sdk:slim"
|
|
310
|
-
],
|
|
312
|
+
"images": ["gcr.io/cloud-spanner-emulator/emulator:latest"],
|
|
311
313
|
"docs_globs": ["docs/supported-databases/spanner.rst"]
|
|
312
314
|
},
|
|
313
315
|
"sqlanywhere": {
|
|
@@ -322,6 +324,13 @@
|
|
|
322
324
|
"images": ["datagrip/sybase:16.0"],
|
|
323
325
|
"docs_globs": ["docs/supported-databases/sybase.rst"]
|
|
324
326
|
},
|
|
327
|
+
"teradata": {
|
|
328
|
+
"source_globs": ["src/pytest_databases/docker/teradata.py"],
|
|
329
|
+
"test_paths": ["tests/test_teradata.py"],
|
|
330
|
+
"images": [],
|
|
331
|
+
"image_required": false,
|
|
332
|
+
"docs_globs": ["docs/supported-databases/teradata.rst"]
|
|
333
|
+
},
|
|
325
334
|
"valkey": {
|
|
326
335
|
"source_globs": ["src/pytest_databases/docker/valkey.py"],
|
|
327
336
|
"test_paths": ["tests/test_valkey.py"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pytest-databases
|
|
3
|
-
Version: 0.20.0-beta.
|
|
3
|
+
Version: 0.20.0-beta.3
|
|
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
|
|
@@ -8,7 +8,7 @@ Project-URL: Source, https://github.com/litestar-org/pytest-databases
|
|
|
8
8
|
Author-email: Cody Fincher <cody@litestar.dev>
|
|
9
9
|
License-Expression: MIT
|
|
10
10
|
License-File: LICENSE
|
|
11
|
-
Keywords: alloydb,alloydbomni,azure,bigquery,cockroachdb,database,doltdb,dragonflydb,duckdb,elasticsearch,flightsql,gizmosql,migration,mongodb,mssql,mysql,oracle,postgres,redis,spanner,valkey
|
|
11
|
+
Keywords: alloydb,alloydbomni,azure,bigquery,cockroachdb,database,doltdb,dragonflydb,duckdb,elasticsearch,flightsql,gizmosql,hardcharger,migration,mongodb,mssql,mysql,oracle,postgres,redis,spanner,teradata,valkey
|
|
12
12
|
Classifier: Development Status :: 4 - Beta
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -91,7 +91,7 @@ Ready-made database and cloud emulator fixtures for your pytest tests.
|
|
|
91
91
|
- **MySQL**: MySQL 5.6, 5.7, 8.0, 8.4 LTS, 9.6, and 9.7
|
|
92
92
|
- **MariaDB**: MariaDB 11.3, 11.4 LTS, 11.8 LTS, 12.2, 12.3, and 13.0
|
|
93
93
|
- **Dolt**: Versioned MySQL-compatible database
|
|
94
|
-
- **Oracle Database**: Oracle 18c XE,
|
|
94
|
+
- **Oracle Database**: Oracle 18c XE, Oracle AI Database 26ai Free, and Autonomous AI Database Free (26ai) with wallet extraction
|
|
95
95
|
- **Microsoft SQL Server**: SQL Server 2022 and 2025
|
|
96
96
|
- **IBM Db2**: Db2 Community Edition 12.1 (`icr.io/db2_community/db2:12.1.5.0`)
|
|
97
97
|
- **Google Cloud Spanner**: Cloud Spanner emulator
|
|
@@ -101,6 +101,7 @@ Ready-made database and cloud emulator fixtures for your pytest tests.
|
|
|
101
101
|
- **YugabyteDB**: Distributed PostgreSQL-compatible database
|
|
102
102
|
- **MongoDB**: Document database
|
|
103
103
|
- **GizmoSQL**: Apache Arrow Flight SQL service (DuckDB and SQLite backends)
|
|
104
|
+
- **Hardcharger**: DuckDB analytics server speaking Chargewire (HTTP + Apache Arrow)
|
|
104
105
|
- **Redis / Valkey / Dragonfly / KeyDB**: In-memory key-value stores
|
|
105
106
|
- **Elasticsearch**: Elasticsearch 7, 8, and 9
|
|
106
107
|
- **Azure Blob Storage**: Azurite emulator
|
|
@@ -112,6 +113,7 @@ Ready-made database and cloud emulator fixtures for your pytest tests.
|
|
|
112
113
|
- **Floci**: Floci emulators for AWS, Azure, GCP, and OCI, one container per cloud
|
|
113
114
|
- **SAP ASE (Sybase)**: SAP Adaptive Server Enterprise 16.0 (`datagrip/sybase:16.0`)
|
|
114
115
|
- **SAP SQL Anywhere**: SQL Anywhere 16 (`jaschweder/sybase:latest`)
|
|
116
|
+
- **Teradata Vantage**: Opt-in external endpoint (`teradata_external_service`) and BYO container image (`teradata_service`) fixtures
|
|
115
117
|
- **Cloudflare KV, R2, and D1**: Miniflare 5 Local Explorer and R2 S3 APIs in a `node:22-slim` container
|
|
116
118
|
- **PostgreSQL template databases**: build the schema once and clone it per test database (`"template"` isolation)
|
|
117
119
|
- **Embedded PostgreSQL**: local `initdb`/`postgres` binaries without a container runtime (`embedded-postgres` extra)
|
|
@@ -31,7 +31,7 @@ Ready-made database and cloud emulator fixtures for your pytest tests.
|
|
|
31
31
|
- **MySQL**: MySQL 5.6, 5.7, 8.0, 8.4 LTS, 9.6, and 9.7
|
|
32
32
|
- **MariaDB**: MariaDB 11.3, 11.4 LTS, 11.8 LTS, 12.2, 12.3, and 13.0
|
|
33
33
|
- **Dolt**: Versioned MySQL-compatible database
|
|
34
|
-
- **Oracle Database**: Oracle 18c XE,
|
|
34
|
+
- **Oracle Database**: Oracle 18c XE, Oracle AI Database 26ai Free, and Autonomous AI Database Free (26ai) with wallet extraction
|
|
35
35
|
- **Microsoft SQL Server**: SQL Server 2022 and 2025
|
|
36
36
|
- **IBM Db2**: Db2 Community Edition 12.1 (`icr.io/db2_community/db2:12.1.5.0`)
|
|
37
37
|
- **Google Cloud Spanner**: Cloud Spanner emulator
|
|
@@ -41,6 +41,7 @@ Ready-made database and cloud emulator fixtures for your pytest tests.
|
|
|
41
41
|
- **YugabyteDB**: Distributed PostgreSQL-compatible database
|
|
42
42
|
- **MongoDB**: Document database
|
|
43
43
|
- **GizmoSQL**: Apache Arrow Flight SQL service (DuckDB and SQLite backends)
|
|
44
|
+
- **Hardcharger**: DuckDB analytics server speaking Chargewire (HTTP + Apache Arrow)
|
|
44
45
|
- **Redis / Valkey / Dragonfly / KeyDB**: In-memory key-value stores
|
|
45
46
|
- **Elasticsearch**: Elasticsearch 7, 8, and 9
|
|
46
47
|
- **Azure Blob Storage**: Azurite emulator
|
|
@@ -52,6 +53,7 @@ Ready-made database and cloud emulator fixtures for your pytest tests.
|
|
|
52
53
|
- **Floci**: Floci emulators for AWS, Azure, GCP, and OCI, one container per cloud
|
|
53
54
|
- **SAP ASE (Sybase)**: SAP Adaptive Server Enterprise 16.0 (`datagrip/sybase:16.0`)
|
|
54
55
|
- **SAP SQL Anywhere**: SQL Anywhere 16 (`jaschweder/sybase:latest`)
|
|
56
|
+
- **Teradata Vantage**: Opt-in external endpoint (`teradata_external_service`) and BYO container image (`teradata_service`) fixtures
|
|
55
57
|
- **Cloudflare KV, R2, and D1**: Miniflare 5 Local Explorer and R2 S3 APIs in a `node:22-slim` container
|
|
56
58
|
- **PostgreSQL template databases**: build the schema once and clone it per test database (`"template"` isolation)
|
|
57
59
|
- **Embedded PostgreSQL**: local `initdb`/`postgres` binaries without a container runtime (`embedded-postgres` extra)
|
|
@@ -94,7 +94,7 @@ Added
|
|
|
94
94
|
the first ``db2start`` so the database is created on storage with 4096-byte logical sectors.
|
|
95
95
|
* ``oracle_adb_service`` (``OracleADBService`` with TLS, mTLS, ORDS and MongoDB API ports, ``wallet_dir``,
|
|
96
96
|
``ords_url``, ``apex_url``, ``sql_developer_url``, ``mongo_uri``, ``extract_wallet()`` and ``enable_ords_schema()``)
|
|
97
|
-
for Oracle Autonomous Database Free (default ``container-registry.oracle.com/database/adb-free:latest-
|
|
97
|
+
for Oracle Autonomous AI Database Free (default ``container-registry.oracle.com/database/adb-free:latest-26ai``, env
|
|
98
98
|
``ORACLE_ADB_IMAGE``), the ``oracle_adb_image``, ``oracle_adb_workload_type``, ``oracle_adb_hostname``,
|
|
99
99
|
``oracle_adb_tz``, ``oracle_adb_password``, ``oracle_adb_admin_password``, ``oracle_adb_wallet_password``,
|
|
100
100
|
``oracle_adb_wallet_dir``, ``oracle_adb_volumes``, ``oracle_adb_devices`` and ``oracle_adb_filesystemio_options``
|
|
@@ -102,26 +102,30 @@ Added
|
|
|
102
102
|
``extract_adb_wallet``, ``parse_tnsnames``, ``rewrite_tnsnames`` and ``rewrite_sqlnet_ora``.
|
|
103
103
|
``oracle_adb_filesystemio_options`` (default ``NONE``, env ``ORACLE_ADB_FILESYSTEMIO_OPTIONS``) rewrites the server
|
|
104
104
|
parameter file before the database starts so the instance opens on storage with 4096-byte logical sectors.
|
|
105
|
-
* Floci cloud emulators in ``pytest_databases.docker.floci``: ``floci_aws_service`` (``FlociAWSService
|
|
106
|
-
``floci/floci:2.4.0``, port ``4566``), ``floci_az_service``
|
|
107
|
-
``floci/floci-az:0.16.0``, port ``4577``), ``floci_gcp_service``
|
|
108
|
-
``
|
|
109
|
-
``
|
|
110
|
-
``
|
|
111
|
-
|
|
112
|
-
``
|
|
113
|
-
``
|
|
114
|
-
``
|
|
115
|
-
``
|
|
116
|
-
``
|
|
105
|
+
* Floci cloud emulators in ``pytest_databases.docker.floci``: ``floci_aws_service`` (``FlociAWSService`` with
|
|
106
|
+
``ensure_bucket(bucket_name) -> None``, image ``floci/floci:2.4.0``, port ``4566``), ``floci_az_service``
|
|
107
|
+
(``FlociAzureService`` with ``blob_endpoint``, ``floci/floci-az:0.16.0``, port ``4577``), ``floci_gcp_service``
|
|
108
|
+
(``FlociGCPService`` with ``ensure_bucket()``, ``storage_emulator_host`` and ``pubsub_emulator_host``,
|
|
109
|
+
``floci/floci-gcp:0.12.0``, port ``4588``) backed by the session-scoped ``floci_gcp_compat_proxy``
|
|
110
|
+
(``FLOCI_GCP_COMPAT_PROXY``, default ``True``) for ``obstore``, ``gcsfs``, and ``google-cloud-storage``
|
|
111
|
+
compatibility, and ``floci_oci_service`` (``FlociOCIService`` with ``ensure_bucket()``,
|
|
112
|
+
``floci/floci-oci:0.6.0``, port ``4599``), with ``floci_<cloud>_image`` fixtures (env ``FLOCI_AWS_IMAGE``,
|
|
113
|
+
``FLOCI_AZ_IMAGE``, ``FLOCI_GCP_IMAGE``, ``FLOCI_OCI_IMAGE``), ``floci_aws_region``, ``floci_aws_access_key``,
|
|
114
|
+
``floci_aws_secret_key``, ``floci_az_account_name``, ``floci_az_account_key``, ``floci_gcp_project``,
|
|
115
|
+
``floci_oci_namespace`` (default ``floci-local``), ``floci_oci_region``, ``floci_oci_compartment_id``,
|
|
116
|
+
``floci_resource_prefix``, ``xdist_floci_isolation_level`` (default ``database``: one container per cloud),
|
|
117
|
+
``provide_floci_container``, ``provide_floci_gcp_service``, ``check_floci_health``, ``ensure_gcs_bucket``,
|
|
118
|
+
``ensure_oci_bucket``, ``FLOCI_CONTAINER_PORTS`` and ``FLOCI_HEALTH_PATHS`` (gh-188).
|
|
117
119
|
* ``snowflake_service`` (``SnowflakeService`` with ``endpoint``, ``connection_kwargs``, ``login()`` and ``query()``)
|
|
118
120
|
for the Embucket Snowflake-compatible emulator (default ``embucket/embucket:0.2.2``, env ``SNOWFLAKE_IMAGE``, port
|
|
119
121
|
``3000``), the ``snowflake_image``, ``snowflake_user``, ``snowflake_password``, ``snowflake_account``,
|
|
120
|
-
``snowflake_database``, ``snowflake_schema``, ``snowflake_warehouse``, ``snowflake_role
|
|
121
|
-
``
|
|
122
|
-
|
|
123
|
-
``
|
|
124
|
-
``
|
|
122
|
+
``snowflake_database``, ``snowflake_schema``, ``snowflake_warehouse``, ``snowflake_role``,
|
|
123
|
+
``snowflake_wire_compat`` (``SNOWFLAKE_WIRE_COMPAT``, default ``True``) and ``xdist_snowflake_isolation_level``
|
|
124
|
+
(default ``database``: one container, a ``public_<worker>`` schema per worker) fixtures, and
|
|
125
|
+
``provide_snowflake_service(..., wire_compat=True)`` (enabling gzip decompression, positional ``?`` binding
|
|
126
|
+
substitution, and stringified ``rowset`` cells for ``snowflake-connector-python``), ``check_snowflake_health``,
|
|
127
|
+
``login_snowflake_emulator`` and ``query_snowflake_emulator``. ``query()`` logs in as ``snowflake_user`` and runs
|
|
128
|
+
in ``snowflake_database`` / ``snowflake_schema`` (gh-187).
|
|
125
129
|
* ``sybase_service`` (``SybaseService`` with ``connection_config``, ``dsn``, ``exec_sql()`` and
|
|
126
130
|
``create_worker_database()``) for SAP ASE (default ``datagrip/sybase:16.0``, env ``SYBASE_IMAGE``, port ``5000``),
|
|
127
131
|
the ``sybase_image``, ``sybase_user``, ``sybase_password``, ``sybase_database``, ``sybase_startup_timeout`` and
|
|
@@ -136,6 +140,11 @@ Added
|
|
|
136
140
|
the native client libraries and sets ``SQLANY16`` / ``SQLANY_API_DLL`` for the session), and
|
|
137
141
|
``provide_sqlanywhere_service``, ``exec_dbisql``, ``extract_sqlanywhere_client_libs`` and
|
|
138
142
|
``sqlanywhere_client_environment``.
|
|
143
|
+
* ``hardcharger_service`` (``HardchargerService`` with ``uri`` and ``connection_kwargs``) for
|
|
144
|
+
`Hardcharger <https://github.com/gizmodata/hardcharger>`_ (default ``ghcr.io/gizmodata/hardcharger:latest``, port
|
|
145
|
+
``31337``, plain HTTP), the ``hardcharger_image``, ``hardcharger_username``, ``hardcharger_password`` and
|
|
146
|
+
``xdist_hardcharger_isolation_level`` (default ``database``; one container per worker at either level) fixtures,
|
|
147
|
+
and ``provide_hardcharger_service``, ``exec_hardcharger`` and ``HARDCHARGER_PORT``.
|
|
139
148
|
* ``"template"`` value for ``xdist_postgres_isolation_level`` (typed ``PostgresXdistIsolationLevel``): one container,
|
|
140
149
|
a template database built once under a file lock, and the service database cloned from it with
|
|
141
150
|
``CREATE DATABASE ... TEMPLATE``, with or without ``pytest-xdist``, for every PostgreSQL family service. Fixtures
|
|
@@ -145,16 +154,17 @@ Added
|
|
|
145
154
|
(``pytest_databases_template_<digest>``). ``PostgresService.ensure_template()``,
|
|
146
155
|
``create_worker_database_from_template()``, ``sweep_worker_databases()`` and ``compute_fingerprint()``.
|
|
147
156
|
* ``pytest_databases.embedded.postgres``: ``embedded_postgres_service`` (``EmbeddedPostgresService`` with ``dsn``,
|
|
148
|
-
``connection_config``, ``
|
|
157
|
+
``connection_config``, ``password`` defaulting to ``""``, ``exec_sql(..., tuples_only=False, timeout=30.0) -> tuple[int, bytes]``,
|
|
158
|
+
and the same template helpers including ``init_sql`` staging as ``PostgresService``) runs local ``initdb`` /
|
|
149
159
|
``postgres`` binaries with trust authentication on a loopback port, without a container runtime or ``psql``.
|
|
150
160
|
Binaries come from ``embedded_postgres_bin_dir``, ``PG_BIN_DIR``, the new ``embedded-postgres`` extra (``pgembed``
|
|
151
161
|
on Python 3.12+, ``pgserver`` on 3.11), the ``PATH``, ``pg_config --bindir``, or common install directories.
|
|
152
162
|
Fixtures ``embedded_postgres_user``, ``embedded_postgres_database``, ``embedded_postgres_port``,
|
|
153
163
|
``embedded_postgres_bin_dir``, ``embedded_postgres_template_name``, ``embedded_postgres_template_setup``,
|
|
154
|
-
``embedded_postgres_template_fingerprint_sources``, ``embedded_postgres_template_lock_dir``
|
|
155
|
-
``xdist_embedded_postgres_isolation_level`` (default ``template``: xdist workers share one cluster and each gets a
|
|
156
|
-
database cloned from the template). ``provide_embedded_postgres_service
|
|
157
|
-
``PostgresBinaries
|
|
164
|
+
``embedded_postgres_template_fingerprint_sources``, ``embedded_postgres_template_lock_dir``, ``postgres_any_service``,
|
|
165
|
+
and ``xdist_embedded_postgres_isolation_level`` (default ``template``: xdist workers share one cluster and each gets a
|
|
166
|
+
database cloned from the template). ``provide_embedded_postgres_service(..., password="", init_sql=None)``,
|
|
167
|
+
``resolve_postgres_binaries`` and ``PostgresBinaries`` (gh-185, gh-193).
|
|
158
168
|
* ``cloudflare_service`` (``CloudflareService`` with ``api_base_url``, ``r2_s3_endpoint_url``, ``kv_put()``,
|
|
159
169
|
``kv_get()``, ``r2_put()``, ``r2_get()`` and ``d1_query()``) for Cloudflare KV, R2 and D1, backed by Miniflare's
|
|
160
170
|
Local Explorer API and R2 S3 endpoint in a ``node:22-slim`` container (env ``CLOUDFLARE_IMAGE``, port ``8787``;
|
|
@@ -164,8 +174,99 @@ Added
|
|
|
164
174
|
``cloudflare_secret_access_key``, ``cloudflare_startup_timeout`` (default ``300``) and
|
|
165
175
|
``xdist_cloudflare_isolation_level`` (default ``database``: one container binding ``<name>_<worker>`` for every
|
|
166
176
|
worker), and ``provide_cloudflare_service``.
|
|
167
|
-
* ``
|
|
168
|
-
for
|
|
177
|
+
* ``ContainerService.temp_dir`` exposing a session-scoped temporary :class:`pathlib.Path` on ``container_service`` /
|
|
178
|
+
``docker_service`` for cross-worker ``FileLock`` and session state coordination (gh-184, gh-186).
|
|
179
|
+
* ``pytest_databases.send_http_request`` (returning ``(status, headers, body)``), ``ssl_context`` support on
|
|
180
|
+
``pytest_databases.helpers.http_request`` (returning ``(status, body)``), and public
|
|
181
|
+
``pytest_databases.create_s3_bucket(..., timeout=10.0, ssl_context=None) -> bool`` (also exported from
|
|
182
|
+
``pytest_databases.helpers``) for creating S3 buckets without routing through ambient
|
|
183
|
+
``HTTP_PROXY`` / ``HTTPS_PROXY`` / ``ALL_PROXY`` variables (gh-184, gh-188).
|
|
184
|
+
* ``PostgresServiceProtocol``, ``PostgresBackend``, ``--postgres-backend`` CLI flag / ``postgres_backend`` ini
|
|
185
|
+
setting / ``PYTEST_DATABASES_POSTGRES_BACKEND`` env var (resolved via ``resolve_postgres_backend``), and portable
|
|
186
|
+
session-scoped ``postgres_any_service`` fixture switching cleanly between Docker and embedded PostgreSQL (gh-193).
|
|
187
|
+
* ``postgres_startup_timeout`` (default ``60``), ``alloydb_omni_shm_size`` (default ``"512m"``),
|
|
188
|
+
``alloydb_omni_startup_timeout`` (default ``90``), ``alloydb_omni_command`` and ``alloydb_omni_legacy_command``
|
|
189
|
+
(``build_alloydb_omni_command``), automatic ``CREATE EXTENSION IF NOT EXISTS vector`` across ``pgvector_service``
|
|
190
|
+
and ``pgvector_13_service``..``pgvector_18_service``, out-of-the-box AlloyDB Omni ``google_columnar_engine``,
|
|
191
|
+
``pg_stat_statements``, ``vector``, ``alloydb_scann``, ``google_ml_integration``, and ``alloydb_ai_nl`` (versions
|
|
192
|
+
15–18) plus ``pg_textsearch`` BM25 (versions 17/18), and ``init_sql`` staging on
|
|
193
|
+
``PostgresTemplateSupport.ensure_template`` (gh-185).
|
|
194
|
+
* ``CockroachDBService.user`` (default ``"root"``), ``CockroachDBService.dsn``,
|
|
195
|
+
``CockroachDBService.connection_config`` (``"database"`` key aligned with ``PostgresService``),
|
|
196
|
+
``CockroachDBService.exec_sql(...) -> tuple[int, bytes]``, and public ``exec_cockroach_sql`` (gh-193).
|
|
197
|
+
* ``SpannerService.emulator_host`` and ``configure_spanner_emulator_client_guards`` disabling built-in client metrics,
|
|
198
|
+
shortening ``DatabaseSessionsManager._MAINTENANCE_THREAD_POLLING_INTERVAL`` to 100ms, raising session-manager logger
|
|
199
|
+
verbosity to ``WARNING``, and suppressing closed-stream ``ValueError`` teardown tracebacks (gh-189).
|
|
200
|
+
* ``BigQueryService.is_healthy(*, timeout=5.0)`` and ``BIGQUERY_IMAGE`` environment override on ``bigquery_image``
|
|
201
|
+
(gh-190).
|
|
202
|
+
* ``db2_volumes`` fixture (gh-186), public ``exec_sqlplus``, ``OracleADBService.mtls_alias``, and
|
|
203
|
+
``OracleADBService.build_wallet_zip`` with optional ``cryptography`` PKCS#12 ``ewallet.p12`` synthesis (gh-191), and
|
|
204
|
+
``SybaseService.write_freetds_conf`` plus session-scoped ``sybase_freetds_alias`` for FreeTDS 5.0 clients (gh-192).
|
|
205
|
+
* ``oracle_startup_timeout`` (default ``180``, env ``ORACLE_STARTUP_TIMEOUT``) and ``oracle_adb_startup_timeout``
|
|
206
|
+
(default ``420``, env ``ORACLE_ADB_STARTUP_TIMEOUT``) fixtures, plus validated keyword-only ``timeout`` and ``pause``
|
|
207
|
+
parameters on ``provide_oracle_service`` (defaults ``180`` and ``1.0``) and ``provide_oracle_adb_service``
|
|
208
|
+
(defaults ``420`` and ``2.0``).
|
|
209
|
+
* ``copy_to_container``, ``copy_from_container`` and ``exec_container_command`` in ``pytest_databases.types`` (also
|
|
210
|
+
exported from ``pytest_databases``), plus ``ServiceContainer.copy_to()``, ``ServiceContainer.copy_from()`` and
|
|
211
|
+
``ServiceContainer.exec_command()`` for transferring files and executing commands inside service containers over the
|
|
212
|
+
Docker/Podman SDK archive API.
|
|
213
|
+
* ``has_active_owner_sessions(owner_id)`` and advisory OS ``FileLock`` session leases so concurrent local ``pytest``
|
|
214
|
+
runs sharing an owner ID leave containers running until the final active session exits, while sweeping stale leases
|
|
215
|
+
from crashed processes automatically.
|
|
216
|
+
* Keyword-only ``user``, ``tmpfs`` and ``extra_hosts`` parameters on ``ContainerService.run``, plus
|
|
217
|
+
``pytest_databases.helpers.env_port``, ``read_init_scripts`` and ``run_container_init_once``.
|
|
218
|
+
* ``ExternalPostgresService``, ``provide_external_postgres_service``, ``postgres_external_host`` (env
|
|
219
|
+
``POSTGRES_EXTERNAL_HOST``), ``postgres_external_port`` (env ``POSTGRES_EXTERNAL_PORT``) and
|
|
220
|
+
``postgres_external_service`` in ``pytest_databases.docker.postgres`` for attaching to pre-started PostgreSQL
|
|
221
|
+
endpoints with ``"database"`` or ``"template"`` isolation over the stdlib v3 wire client (which now supports
|
|
222
|
+
``trust``, cleartext, MD5 and ``SCRAM-SHA-256`` authentication).
|
|
223
|
+
* ``PostgresService.dsn``, ``PostgresService.connection_config`` and ``PostgresService.exec_sql()``, the
|
|
224
|
+
``postgres_database`` fixture (default ``"pytest_databases"``, env ``POSTGRES_DATABASE``), ``POSTGRES_USER`` env
|
|
225
|
+
override on ``postgres_user``, and keyword-only ``database``, ``command``, ``env``, ``shm_size``, ``mem_limit``,
|
|
226
|
+
``volumes`` and ``init_sql`` parameters on ``provide_postgres_service``.
|
|
227
|
+
* ``teradata_service`` (``TeradataService``) and ``teradata_external_service`` (``ExternalTeradataService``) in
|
|
228
|
+
``pytest_databases.docker.teradata`` with ``dbs_port``, ``connection_config``, ``provide_teradata_service``,
|
|
229
|
+
``provide_external_teradata_service``, and session fixtures ``teradata_image`` (env ``TERADATA_IMAGE`` /
|
|
230
|
+
``TERADATA_TEST_IMAGE``), ``teradata_external_host`` (env ``TERADATA_EXTERNAL_HOST`` / ``TERADATA_HOST``),
|
|
231
|
+
``teradata_external_port`` (env ``TERADATA_EXTERNAL_PORT`` / ``TERADATA_PORT``), ``teradata_port``,
|
|
232
|
+
``teradata_user``, ``teradata_password``, ``teradata_database``, ``teradata_logmech``, ``teradata_logdata``,
|
|
233
|
+
``teradata_sslmode``, ``teradata_encryptdata``, ``teradata_tmode``, ``teradata_startup_timeout`` (default
|
|
234
|
+
``300.0``), ``teradata_service_environment`` and ``xdist_teradata_isolation_level`` (default ``"server"``),
|
|
235
|
+
plus ``image_required`` support in the CI provider manifest.
|
|
236
|
+
* ``exec_mysql`` / ``MySQLService.exec_sql()`` and ``exec_mariadb`` / ``MariaDBService.exec_sql()`` (passing
|
|
237
|
+
credentials via ``MYSQL_PWD``), ``mysql_port`` (env ``MYSQL_PORT``) and ``mariadb_port`` (env ``MARIADB_PORT``)
|
|
238
|
+
fixtures, ``MYSQL_*`` / ``MARIADB_*`` environment variable lookups on user/password/database fixtures, ``root``
|
|
239
|
+
application user support, and keyword-only ``host_port``, ``command``, ``env`` and ``init_sql`` parameters on
|
|
240
|
+
``provide_mysql_service`` and ``provide_mariadb_service``.
|
|
241
|
+
* ``MSSQLService.exec_sql()``, ``mssql_port`` (env ``MSSQL_PORT``), ``MSSQL_USER`` / ``MSSQL_PASSWORD`` /
|
|
242
|
+
``MSSQL_DATABASE`` environment variable overrides, multi-batch standalone ``GO`` and ``sql_file`` staging with
|
|
243
|
+
``SQLCMDPASSWORD`` credential delivery and ``query_timeout`` in ``exec_sqlcmd``, and keyword-only ``host_port``,
|
|
244
|
+
``env``, ``mem_limit``, ``shm_size`` and ``init_sql`` parameters on ``provide_mssql_service``.
|
|
245
|
+
* ``oracle_26ai_service`` (aliased by ``oracle_service``), ``oracle_26ai_image`` (default
|
|
246
|
+
``gvenzl/oracle-free:23-slim-faststart`` delivering Oracle AI Database 26ai Free ``23.26.x``, env
|
|
247
|
+
``ORACLE_26AI_IMAGE``), ``oracle_26ai_service_name`` (env ``ORACLE_26AI_SERVICE_NAME``), ``exec_oracle_sql`` and
|
|
248
|
+
``OracleService.exec_sql()`` (supporting both PDB TNS targets and OS-authenticated ``CDB$ROOT``
|
|
249
|
+
``sqlplus -L -S / as sysdba`` execution), ``oracle_port`` (env ``ORACLE_PORT``), ``oracle_26ai_port`` (env
|
|
250
|
+
``ORACLE_26AI_PORT``, falling back to ``oracle_port``), ``oracle_18c_port`` (env ``ORACLE_18C_PORT``) and
|
|
251
|
+
``oracle_adb_port`` (env ``ORACLE_ADB_PORT``) fixtures, ``ORACLE_USER`` / ``ORACLE_PASSWORD`` /
|
|
252
|
+
``ORACLE_SYSTEM_PASSWORD`` environment variable overrides, and keyword-only ``host_port``, ``env``, ``volumes``,
|
|
253
|
+
``shm_size``, ``mem_limit`` and ``init_sql`` parameters on ``provide_oracle_service`` and
|
|
254
|
+
``provide_oracle_adb_service``.
|
|
255
|
+
* ``activate_db2_database``, ``Db2Service.activate_database()``, ``db2_activate_database`` (default ``True``, env
|
|
256
|
+
``DB2_ACTIVATE_DATABASE``, keeping in-memory ``MON_GET_*`` metrics alive across disconnects), ``db2_port`` (env
|
|
257
|
+
``DB2_PORT``), and keyword-only ``activate_database``, ``host_port``, ``env``, ``registry_vars``, ``shm_size``,
|
|
258
|
+
``mem_limit``, ``platform`` and ``init_sql`` parameters on ``provide_db2_service``.
|
|
259
|
+
* ``configure_sybase_monitoring``, ``sybase_enable_monitoring`` (default ``False``, env ``SYBASE_ENABLE_MONITORING``)
|
|
260
|
+
and ``sybase_port`` (env ``SYBASE_PORT``) fixtures, ``user`` / ``password`` overrides on
|
|
261
|
+
``SybaseService.exec_sql()``, and keyword-only ``enable_monitoring``, ``host_port``, ``env`` and ``init_sql``
|
|
262
|
+
parameters on ``provide_sybase_service``.
|
|
263
|
+
* ``exec_mongosh``, ``MongoDBService.uri``, ``MongoDBService.exec_js()``, ``MongoDBService.set_profiling_level()`` and
|
|
264
|
+
``MongoDBService.replica_set``, session fixtures ``mongodb_username`` (env ``MONGODB_USER``; ``""`` or ``None`` for
|
|
265
|
+
unauthenticated mode), ``mongodb_password`` (env ``MONGODB_PASSWORD``), ``mongodb_database_name`` (env
|
|
266
|
+
``MONGODB_DATABASE``), ``mongodb_port`` (env ``MONGODB_PORT``) and ``mongodb_replica_set`` (env
|
|
267
|
+
``MONGODB_REPLICA_SET``, bootstrapping a single-node replica set with an automatic internal ``--keyFile`` and
|
|
268
|
+
writable ``PRIMARY`` election), and keyword-only ``host_port``, ``replica_set``, ``command``, ``env``, ``init_js``,
|
|
269
|
+
``profiling_level`` and ``slow_ms`` parameters on ``provide_mongodb_service``.
|
|
169
270
|
|
|
170
271
|
Changed
|
|
171
272
|
~~~~~~~
|
|
@@ -207,12 +308,19 @@ Changed
|
|
|
207
308
|
SharedKey; ``azure-storage-blob`` is no longer imported by the plugin.
|
|
208
309
|
* ``bigquery_service`` checks readiness with a stdlib HTTP query against the emulator REST API; the Google Cloud
|
|
209
310
|
libraries are no longer imported by the plugin. ``bigquery_client`` now closes its client at teardown.
|
|
210
|
-
*
|
|
211
|
-
|
|
212
|
-
|
|
311
|
+
* Pinned default ``bigquery_image`` to ``ghcr.io/goccy/bigquery-emulator:0.8.1`` (``DEFAULT_BIGQUERY_IMAGE``) and
|
|
312
|
+
changed default ``xdist_bigquery_isolation_level`` to ``"server"`` (non-transient shared container in single-process
|
|
313
|
+
sessions, transient per-worker containers under ``pytest-xdist`` to avoid SQLite catalog DDL races); override
|
|
314
|
+
``xdist_bigquery_isolation_level`` to ``"database"`` for per-worker ``test-dataset_<worker>`` datasets on a shared
|
|
315
|
+
container (gh-190).
|
|
316
|
+
* Default ``db2_ipc_mode`` changed to ``"host"`` across Docker and Podman (set ``DB2_IPC_MODE=""`` or override
|
|
317
|
+
``db2_ipc_mode`` to ``None`` to opt into private container IPC namespaces) to prevent ``SQL1042C`` SysV semaphore
|
|
318
|
+
exhaustion (gh-186).
|
|
213
319
|
* Under ``pytest-xdist`` with the default ``database`` isolation, Oracle services start one shared container per
|
|
214
320
|
version and give each worker its own user, so ``OracleService.user`` is ``app_<worker>`` instead of ``app``. Set
|
|
215
321
|
``xdist_oracle_isolation_level`` to ``server`` for the previous container per worker.
|
|
322
|
+
* ``oracle_service`` now aliases ``oracle_26ai_service``, and the default Oracle Free logical service label/container
|
|
323
|
+
stem changed from ``oracle23ai`` to ``oracle26ai``.
|
|
216
324
|
* ``dolt_service`` and ``mysql_8_service`` / ``mysql_84_service`` / ``mysql_96_service`` run the native image
|
|
217
325
|
platform instead of ``linux/x86_64``. ``mysql_56_service`` and ``mysql_57_service`` keep ``linux/x86_64``.
|
|
218
326
|
* MySQL and MariaDB services start with ``--performance-schema=ON``.
|
|
@@ -224,6 +332,45 @@ Changed
|
|
|
224
332
|
fixtures ``elasticsearch8_service`` and ``oracle_23ai_startup_connection``.
|
|
225
333
|
* The deprecated ``@contextmanager`` connection helpers warn with ``stacklevel=3``, which attributes the warning to
|
|
226
334
|
the fixture rather than ``contextlib``.
|
|
335
|
+
* CI workflows ``docs.yml`` and ``release.yaml`` enforce ``uv sync --frozen``, and the unused ``cd.yaml`` workflow is
|
|
336
|
+
removed.
|
|
337
|
+
* ``scripts/ci/select_provider_tests.py`` computes provider cost budgets dynamically from
|
|
338
|
+
``.github/ci/provider-groups.json``, dropping the unused ``cloud-sdk:slim`` image from ``spanner``.
|
|
339
|
+
|
|
340
|
+
Fixed
|
|
341
|
+
~~~~~
|
|
342
|
+
|
|
343
|
+
* Bypass ambient ``HTTP_PROXY``, ``HTTPS_PROXY``, and ``ALL_PROXY`` variables across S3, MinIO, RustFS, Azurite,
|
|
344
|
+
Elasticsearch, Snowflake, Floci, Spanner, and BigQuery HTTP readiness probes while preserving SigV4 and SharedKey
|
|
345
|
+
signatures (gh-184).
|
|
346
|
+
* Serialize concurrent ``pytest-xdist`` user grant provisioning in ``provide_mysql_service`` and
|
|
347
|
+
``provide_mariadb_service``, serialize Db2 4Kn ``db2stop force`` recovery (``SQL1013N`` / SQLSTATE ``42705``) and
|
|
348
|
+
``create_worker_database`` via ``FileLock`` under ``ContainerService.temp_dir`` and in-container ``flock``, and
|
|
349
|
+
fast-fail immediately on Db2 ``SQL1042C`` / ``SQLSTATE=57019`` container startup errors (gh-184, gh-186).
|
|
350
|
+
* Forward ``command``, ``timeout``, ``shm_size``, and ``init_sql`` through PostgreSQL family fixture factories and run
|
|
351
|
+
provider ``init_sql`` statements inside containerized, external, and embedded staging template databases prior to
|
|
352
|
+
user ``postgres_template_setup`` and ``embedded_postgres_template_setup`` hooks (gh-185).
|
|
353
|
+
* Loading the ``pytest11`` plugin (``pytest_databases._service``) no longer imports ``pytest_databases.docker`` on
|
|
354
|
+
startup; ``TRUE_VALUES`` is now defined in ``pytest_databases.helpers`` and re-exported from
|
|
355
|
+
``pytest_databases.docker`` for backward compatibility.
|
|
356
|
+
* ``provide_oracle_service`` (``timeout=180``, ``pause=1.0``) and ``provide_oracle_adb_service`` (``timeout=420``,
|
|
357
|
+
``pause=2.0``) now gate ``sqlplus`` readiness probes with ``tcp_port_open`` before running in-container queries,
|
|
358
|
+
``ensure_oracle_user`` synchronizes and unlocks existing ``pytest-xdist`` worker users idempotently (tolerating
|
|
359
|
+
``ORA-01920`` and ``ORA-28007``), and ``ensure_oracle_user``, ``ensure_oracle_adb_user``, and
|
|
360
|
+
``enable_oracle_ords_schema`` escape single quotes in PL/SQL literals and retry transient ``ORA-*`` startup,
|
|
361
|
+
listener, and lock errors.
|
|
362
|
+
* ``provide_postgres_service`` now forwards ``POSTGRES_USER`` and ``POSTGRES_DB`` into the container environment (and
|
|
363
|
+
omits an empty ``POSTGRES_PASSWORD`` when ``POSTGRES_HOST_AUTH_METHOD=trust`` is supplied) so non-``postgres``
|
|
364
|
+
superusers and custom base database names pass readiness and provisioning cleanly.
|
|
365
|
+
* ``provide_mysql_service`` and ``provide_mariadb_service`` now honor their ``database`` parameter on ``service.db``
|
|
366
|
+
(and ``<database>_<worker>`` under ``pytest-xdist`` ``"database"`` isolation) instead of hardcoding
|
|
367
|
+
``"pytest_databases"``, and combine in-container readiness queries with ``tcp_port_open`` (alongside ``db2`` and
|
|
368
|
+
``mongodb``).
|
|
369
|
+
* ``provide_oracle_service`` now runs ``ensure_oracle_user`` under a cross-worker file lock in single-process runs and
|
|
370
|
+
``pytest-xdist`` ``"server"`` isolation as well as ``"database"`` isolation, granting consistent ``CONNECT``,
|
|
371
|
+
``RESOURCE``, ``DBA`` and ``QUOTA UNLIMITED ON USERS`` privileges across all execution modes.
|
|
372
|
+
* ``ContainerService.run(exec_after_start=...)`` now runs once per shared container under a cross-worker file lock and
|
|
373
|
+
raises ``RuntimeError`` when the post-start command exits with a non-zero status.
|
|
227
374
|
|
|
228
375
|
Deprecated
|
|
229
376
|
~~~~~~~~~~
|
|
@@ -243,8 +390,12 @@ Deprecated
|
|
|
243
390
|
* ``cockroachdb_connection``; use ``cockroachdb_service`` and open your own ``psycopg`` connection. Removal in 1.0.0.
|
|
244
391
|
* ``mongodb_connection`` and ``mongodb_database``; use ``mongodb_service`` and open your own ``pymongo`` client.
|
|
245
392
|
Each now emits a single warning. Removal in 1.0.0.
|
|
246
|
-
* ``oracle_18c_connection``, ``oracle_23ai_connection``, ``oracle_startup_connection``
|
|
247
|
-
use ``oracle_service`` (or the versioned services) and open your own ``oracledb``
|
|
393
|
+
* ``oracle_18c_connection``, ``oracle_23ai_connection``, ``oracle_26ai_connection``, ``oracle_startup_connection``
|
|
394
|
+
and ``oracle_responsive``; use ``oracle_service`` (or the versioned services) and open your own ``oracledb``
|
|
395
|
+
connection. Removal in 1.0.0.
|
|
396
|
+
* ``oracle_23ai_service``, ``oracle_23ai_image`` and ``oracle_23ai_service_name``, and overriding them outside
|
|
397
|
+
``pytest_databases``; use and override ``oracle_26ai_service``, ``oracle_26ai_image`` and
|
|
398
|
+
``oracle_26ai_service_name`` instead. Removal in 1.0.0.
|
|
248
399
|
* ``spanner_connection``, ``SpannerService.credentials``, ``SpannerService.client_options`` and the ``credentials``
|
|
249
400
|
argument of ``SpannerService`` (now ignored); build the client, ``AnonymousCredentials()`` and
|
|
250
401
|
``ClientOptions(api_endpoint=service.endpoint)`` yourself. Removal in 1.0.0.
|
{pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/getting-started/configuration.rst
RENAMED
|
@@ -49,15 +49,65 @@ Each session derives an owner ID from the pytest root path. Containers are named
|
|
|
49
49
|
``pytest_databases_<service>_<owner>`` and carry the labels ``pytest_databases``, ``pytest_databases.owner`` (the owner
|
|
50
50
|
ID) and ``pytest_databases.service``. At session start and end, ``pytest-databases`` only removes containers whose
|
|
51
51
|
``pytest_databases.owner`` label matches the current session, so separate checkouts never stop each other's
|
|
52
|
-
containers
|
|
52
|
+
containers. Each active session also holds an advisory OS file lease under its owner ID: if two local ``pytest``
|
|
53
|
+
processes run against the same checkout at the same time, shared containers remain running until the final active
|
|
54
|
+
session exits, while stale leases from crashed processes or processes terminated with ``SIGKILL`` are released by the
|
|
55
|
+
kernel and cleaned up on the next run.
|
|
53
56
|
|
|
54
57
|
* ``PYTEST_DATABASES_NAMESPACE``: suffix appended to the owner ID. Set it to run two sessions from the same checkout
|
|
55
58
|
at the same time without sharing containers.
|
|
56
59
|
* ``--keep-containers`` or ``PYTEST_DATABASES_KEEP_CONTAINERS`` (``1``, ``true``, ``yes``, ``on``, ...): leave the
|
|
57
60
|
containers running after the session. The next session with the same owner ID reuses them.
|
|
58
61
|
|
|
59
|
-
``pytest_databases.
|
|
60
|
-
|
|
62
|
+
``pytest_databases.has_active_owner_sessions(owner_id)`` inspects whether another live session currently holds a lease
|
|
63
|
+
for ``owner_id``. ``pytest_databases.stop_owned_containers(client, owner_id)`` and
|
|
64
|
+
``pytest_databases.stop_all_containers(client)`` remove containers by hand; the latter removes every container labelled
|
|
65
|
+
``pytest_databases`` regardless of owner.
|
|
66
|
+
|
|
67
|
+
Custom Container Options and File Transfers
|
|
68
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
69
|
+
|
|
70
|
+
``container_service`` (aliased as ``docker_service``) exposes ``temp_dir`` (:attr:`~pytest_databases._service.ContainerService.temp_dir`), a session-scoped temporary :class:`pathlib.Path` for cross-worker ``filelock.FileLock`` coordination and session state files.
|
|
71
|
+
|
|
72
|
+
Custom fixtures calling ``container_service.run(...)`` can pass ``user``, ``tmpfs``, ``extra_hosts``, ``volumes``,
|
|
73
|
+
``shm_size``, ``mem_limit``, ``entrypoint``, ``command``, ``privileged``, ``ipc_mode``, ``cap_add``, ``devices`` and
|
|
74
|
+
``hostname`` directly to the container runtime. When ``exec_after_start`` is set on a shared container, it runs once
|
|
75
|
+
per container under a cross-worker file lock and raises ``RuntimeError`` if the command exits with a non-zero status.
|
|
76
|
+
|
|
77
|
+
Every container-backed service inherits from :class:`~pytest_databases.types.ServiceContainer`, which exposes stdlib
|
|
78
|
+
tar-archive transfer and command helpers without requiring ``docker cp`` or host client CLIs:
|
|
79
|
+
|
|
80
|
+
* ``service.copy_to(source, destination_dir, *, arcname=None, mode=None, uid=None, gid=None)``
|
|
81
|
+
(:func:`~pytest_databases.types.copy_to_container`): upload a host file or directory into the running container,
|
|
82
|
+
creating missing parent directories automatically.
|
|
83
|
+
* ``service.copy_from(source, destination, *, strip_components=False)``
|
|
84
|
+
(:func:`~pytest_databases.types.copy_from_container`): extract a file or directory from the container into a host
|
|
85
|
+
directory while rejecting path traversal, special device entries, and escaping links.
|
|
86
|
+
* ``service.exec_command(command, *, user=None, workdir=None, env=None)``
|
|
87
|
+
(:func:`~pytest_databases.types.exec_container_command`): execute a command inside the container and return
|
|
88
|
+
``(exit_code, output_bytes)``.
|
|
89
|
+
|
|
90
|
+
PostgreSQL Backend Selection
|
|
91
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
92
|
+
|
|
93
|
+
Suites targeting ``postgres_any_service`` (:class:`~pytest_databases.PostgresServiceProtocol`) can switch seamlessly
|
|
94
|
+
between containerized PostgreSQL (``"docker"``) and local embedded binaries (``"embedded"``):
|
|
95
|
+
|
|
96
|
+
* ``--postgres-backend`` (``docker`` or ``embedded``): CLI option with highest precedence.
|
|
97
|
+
* ``postgres_backend`` (ini): ``[tool.pytest.ini_options]`` setting used when ``--postgres-backend`` is omitted.
|
|
98
|
+
* ``PYTEST_DATABASES_POSTGRES_BACKEND``: environment variable fallback before defaulting to ``"docker"``.
|
|
99
|
+
|
|
100
|
+
``resolve_postgres_backend(config)`` resolves the active :data:`~pytest_databases.PostgresBackend` and raises
|
|
101
|
+
``pytest.UsageError`` for unsupported values. Selecting ``"embedded"`` resolves ``postgres_any_service`` directly via
|
|
102
|
+
embedded PostgreSQL without probing Docker or Podman.
|
|
103
|
+
|
|
104
|
+
Proxy-Free Readiness Helpers
|
|
105
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
106
|
+
|
|
107
|
+
``pytest_databases.send_http_request``, ``pytest_databases.helpers.http_request(..., ssl_context=...)``, and
|
|
108
|
+
``pytest_databases.create_s3_bucket(..., timeout=10.0, ssl_context=None)`` (also exported from
|
|
109
|
+
``pytest_databases.helpers``) use Python's standard library with ambient ``HTTP_PROXY``, ``HTTPS_PROXY``, and
|
|
110
|
+
``ALL_PROXY`` variables bypassed so local container and emulator probes never route through corporate proxies.
|
|
61
111
|
|
|
62
112
|
Parallel Execution (``pytest-xdist``) Isolation
|
|
63
113
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
@@ -72,7 +122,8 @@ Services expose a session-scoped ``xdist_<backend>_isolation_level`` fixture tha
|
|
|
72
122
|
template database is built once and each worker database is cloned from it with file-level template cloning
|
|
73
123
|
(``CREATE DATABASE ... TEMPLATE``). See :doc:`../supported-databases/postgres`.
|
|
74
124
|
|
|
75
|
-
|
|
125
|
+
BigQuery defaults to ``"server"`` (creating transient per-worker containers under ``pytest-xdist``, with opt-in
|
|
126
|
+
``"database"`` isolation), while SAP SQL Anywhere supports only ``"server"``, which is also its default.
|
|
76
127
|
|
|
77
128
|
Override the fixture in ``conftest.py`` to change the level:
|
|
78
129
|
|
{pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/bigquery.rst
RENAMED
|
@@ -26,6 +26,7 @@ Usage Example
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def test_bigquery(bigquery_service: BigQueryService) -> None:
|
|
29
|
+
assert bigquery_service.is_healthy() is True
|
|
29
30
|
client = bigquery.Client(
|
|
30
31
|
project=bigquery_service.project,
|
|
31
32
|
client_options=ClientOptions(api_endpoint=bigquery_service.endpoint),
|
|
@@ -39,15 +40,12 @@ Usage Example
|
|
|
39
40
|
Available Fixtures
|
|
40
41
|
------------------
|
|
41
42
|
|
|
42
|
-
* ``bigquery_image``: The Docker image to use for the BigQuery emulator.
|
|
43
|
-
* ``bigquery_service``: A fixture that provides a :class:`~pytest_databases.docker.bigquery.BigQueryService` instance.
|
|
43
|
+
* ``bigquery_image``: The Docker image to use for the BigQuery emulator (default ``ghcr.io/goccy/bigquery-emulator:0.8.1`` via ``DEFAULT_BIGQUERY_IMAGE``, env ``BIGQUERY_IMAGE``; note that the image tag omits a leading ``v``).
|
|
44
|
+
* ``bigquery_service``: A fixture that provides a :class:`~pytest_databases.docker.bigquery.BigQueryService` instance (with ``is_healthy(*, timeout=5.0) -> bool``).
|
|
44
45
|
* ``bigquery_client``: Deprecated fixture that provides a ``google.cloud.bigquery.Client``.
|
|
45
|
-
* ``xdist_bigquery_isolation_level``: ``
|
|
46
|
+
* ``xdist_bigquery_isolation_level``: ``"server"`` (default) or ``"database"``.
|
|
46
47
|
|
|
47
|
-
``
|
|
48
|
-
``database`` isolation, workers share one emulator and each worker gets its own dataset (``test-dataset_<worker>``),
|
|
49
|
-
created before the fixture yields. With ``server`` isolation every worker gets its own emulator and the dataset is
|
|
50
|
-
``test-dataset``. Read the dataset from the service instead of hard-coding it.
|
|
48
|
+
By default (``"server"``), single-process sessions reuse a non-transient shared container while ``pytest-xdist`` gives each worker its own isolated container to avoid ``goccy/bigquery-emulator`` SQLite catalog DDL races. With opt-in ``"database"`` isolation, workers share one emulator and each worker receives ``test-dataset_<worker>`` in ``BigQueryService.dataset``. Read ``bigquery_service.dataset`` instead of hard-coding it.
|
|
51
49
|
|
|
52
50
|
Service API
|
|
53
51
|
-----------
|
{pytest_databases-0.20.0b1 → pytest_databases-0.20.0b3}/docs/supported-databases/cockroachdb.rst
RENAMED
|
@@ -18,29 +18,31 @@ Usage Example
|
|
|
18
18
|
|
|
19
19
|
.. code-block:: python
|
|
20
20
|
|
|
21
|
-
import pytest
|
|
22
21
|
import psycopg
|
|
23
22
|
from pytest_databases.docker.cockroachdb import CockroachDBService
|
|
24
23
|
|
|
25
24
|
pytest_plugins = ["pytest_databases.docker.cockroachdb"]
|
|
26
25
|
|
|
27
|
-
@pytest.fixture(scope="session")
|
|
28
|
-
def cockroach_uri(cockroachdb_service: CockroachDBService) -> str:
|
|
29
|
-
return (
|
|
30
|
-
f"postgresql://root@{cockroachdb_service.host}:{cockroachdb_service.port}"
|
|
31
|
-
f"/{cockroachdb_service.database}?sslmode=disable"
|
|
32
|
-
)
|
|
33
26
|
|
|
34
|
-
def
|
|
35
|
-
|
|
27
|
+
def test_cockroachdb(cockroachdb_service: CockroachDBService) -> None:
|
|
28
|
+
exit_code, output = cockroachdb_service.exec_sql("SELECT 1")
|
|
29
|
+
assert exit_code == 0
|
|
30
|
+
assert isinstance(output, bytes)
|
|
31
|
+
assert cockroachdb_service.connection_config["database"] == cockroachdb_service.database
|
|
32
|
+
with psycopg.connect(cockroachdb_service.dsn) as conn:
|
|
36
33
|
db_open = conn.execute("SELECT 1").fetchone()
|
|
37
34
|
assert db_open is not None and db_open[0] == 1
|
|
38
35
|
|
|
36
|
+
``CockroachDBService`` exposes ``user`` (default ``"root"``), ``dsn`` (``postgresql://root@host:port/database?sslmode=disable``),
|
|
37
|
+
``connection_config`` (``host``, ``port``, ``user``, ``database``, plus ``driver_opts``), and
|
|
38
|
+
``exec_sql(sql, *, database=None) -> tuple[int, bytes]``, delegating to public
|
|
39
|
+
:func:`~pytest_databases.docker.cockroachdb.exec_cockroach_sql`.
|
|
40
|
+
|
|
39
41
|
Available Fixtures
|
|
40
42
|
------------------
|
|
41
43
|
|
|
42
44
|
* ``cockroachdb_image``: The Docker image to use for CockroachDB.
|
|
43
|
-
* ``cockroachdb_service``: A fixture that provides a
|
|
45
|
+
* ``cockroachdb_service``: A fixture that provides a :class:`~pytest_databases.docker.cockroachdb.CockroachDBService` instance.
|
|
44
46
|
|
|
45
47
|
Service API
|
|
46
48
|
-----------
|