pytest-databases 0.7.1__tar.gz → 0.8.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.
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/.pre-commit-config.yaml +1 -1
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/PKG-INFO +1 -1
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/pyproject.toml +115 -41
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/__init__.py +6 -7
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.oracle.yml +2 -2
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/oracle.py +21 -21
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/helpers.py +1 -1
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_oracle.py +15 -15
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/.gitignore +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/.sourcery.yaml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/.vscode/launch.json +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/.vscode/settings.json +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/CODEOWNERS +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/CONTRIBUTING.rst +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/LICENSE +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/Makefile +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/README.md +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/scripts/__init__.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/scripts/build_docs.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/scripts/convert_docs.sh +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/scripts/install-hatch.sh +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/sonar-project.properties +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/__init__.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/__metadata__.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/alloydb_omni.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/azure_blob.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/bigquery.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/cockroachdb.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.alloydb-omni.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.azurite.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.bigquery.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.cockroachdb.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.dragonfly.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.elasticsearch.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.keydb.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.mariadb.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.mssql.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.mysql.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.postgres.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.redis.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.spanner.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/docker-compose.valkey.yml +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/dragonfly.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/elastic_search.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/keydb.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/mariadb.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/mssql.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/mysql.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/postgres.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/redis.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/spanner.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/valkey.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/py.typed +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/__init__.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/conftest.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/__init__.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_alloydb_omni.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_azure_blob.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_bigquery.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_cockroachdb.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_dragonfly.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_elasticsearch.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_keydb.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_mariadb.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_mssql.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_mysql.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_postgres.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_redis.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_spanner.py +0 -0
- {pytest_databases-0.7.1 → pytest_databases-0.8.0}/tests/docker/test_valkey.py +0 -0
|
@@ -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.
|
|
22
|
+
rev: "v0.5.6" # 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.3
|
|
2
2
|
Name: pytest-databases
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8.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
|
|
@@ -12,7 +12,7 @@ license = "MIT"
|
|
|
12
12
|
name = "pytest-databases"
|
|
13
13
|
readme = "README.md"
|
|
14
14
|
requires-python = ">=3.8"
|
|
15
|
-
version = "0.
|
|
15
|
+
version = "0.8.0"
|
|
16
16
|
#
|
|
17
17
|
authors = [{ name = "Cody Fincher", email = "cody.fincher@gmail.com" }]
|
|
18
18
|
keywords = [
|
|
@@ -67,12 +67,15 @@ redis = ["redis"]
|
|
|
67
67
|
spanner = ["google-cloud-spanner"]
|
|
68
68
|
sqlite = ["aiosqlite"]
|
|
69
69
|
|
|
70
|
+
|
|
70
71
|
######################
|
|
71
72
|
# Build & Versioning #
|
|
72
73
|
######################
|
|
73
74
|
[tool.hatch.build.targets.sdist]
|
|
74
75
|
exclude = ["/.github", "/docs"]
|
|
75
76
|
|
|
77
|
+
[tool.hatch.metadata]
|
|
78
|
+
allow-direct-references = true
|
|
76
79
|
|
|
77
80
|
#####################
|
|
78
81
|
# Environment Setup #
|
|
@@ -81,6 +84,41 @@ exclude = ["/.github", "/docs"]
|
|
|
81
84
|
|
|
82
85
|
# Default environment with production dependencies
|
|
83
86
|
[tool.hatch.envs.default]
|
|
87
|
+
extra-dependencies = [
|
|
88
|
+
# tests
|
|
89
|
+
"anyio",
|
|
90
|
+
"coverage[toml]>=6.2",
|
|
91
|
+
"coverage[toml]>=6.2",
|
|
92
|
+
"pytest",
|
|
93
|
+
"pytest-cov",
|
|
94
|
+
"pytest-mock",
|
|
95
|
+
"pytest-vcr",
|
|
96
|
+
"pytest-sugar",
|
|
97
|
+
"pytest-click",
|
|
98
|
+
"pytest-xdist",
|
|
99
|
+
# lint
|
|
100
|
+
"mypy",
|
|
101
|
+
"ruff",
|
|
102
|
+
"pylint",
|
|
103
|
+
"pre-commit",
|
|
104
|
+
"types-click",
|
|
105
|
+
"types-six",
|
|
106
|
+
"types-decorator",
|
|
107
|
+
"types-pyyaml",
|
|
108
|
+
"asyncpg-stubs",
|
|
109
|
+
"types-docutils",
|
|
110
|
+
"types-redis",
|
|
111
|
+
# docs
|
|
112
|
+
"sphinx>=7.1.2",
|
|
113
|
+
"sphinx-autobuild>=2021.3.14",
|
|
114
|
+
"sphinx-copybutton>=0.5.2",
|
|
115
|
+
"litestar-sphinx-theme @ git+https://github.com/litestar-org/litestar-sphinx-theme.git",
|
|
116
|
+
"sphinx-click>=5.0.1",
|
|
117
|
+
"sphinx-toolbox>=3.5.0",
|
|
118
|
+
"sphinx-design>=0.5.0",
|
|
119
|
+
"sphinxcontrib-mermaid>=0.9.2",
|
|
120
|
+
"auto-pytabs[sphinx]>=0.4.0",
|
|
121
|
+
]
|
|
84
122
|
installer = "uv"
|
|
85
123
|
python = "3.12"
|
|
86
124
|
|
|
@@ -88,9 +126,10 @@ python = "3.12"
|
|
|
88
126
|
# Test environment with test-only dependencies
|
|
89
127
|
[tool.hatch.envs.test]
|
|
90
128
|
extra-dependencies = [
|
|
91
|
-
|
|
129
|
+
# tests
|
|
92
130
|
"anyio",
|
|
93
131
|
"coverage[toml]>=6.2",
|
|
132
|
+
"coverage[toml]>=6.2",
|
|
94
133
|
"pytest",
|
|
95
134
|
"pytest-cov",
|
|
96
135
|
"pytest-mock",
|
|
@@ -98,6 +137,28 @@ extra-dependencies = [
|
|
|
98
137
|
"pytest-sugar",
|
|
99
138
|
"pytest-click",
|
|
100
139
|
"pytest-xdist",
|
|
140
|
+
# lint
|
|
141
|
+
"mypy",
|
|
142
|
+
"ruff",
|
|
143
|
+
"pylint",
|
|
144
|
+
"pre-commit",
|
|
145
|
+
"types-click",
|
|
146
|
+
"types-six",
|
|
147
|
+
"types-decorator",
|
|
148
|
+
"types-pyyaml",
|
|
149
|
+
"asyncpg-stubs",
|
|
150
|
+
"types-docutils",
|
|
151
|
+
"types-redis",
|
|
152
|
+
# docs
|
|
153
|
+
"sphinx>=7.1.2",
|
|
154
|
+
"sphinx-autobuild>=2021.3.14",
|
|
155
|
+
"sphinx-copybutton>=0.5.2",
|
|
156
|
+
"litestar-sphinx-theme @ git+https://github.com/litestar-org/litestar-sphinx-theme.git",
|
|
157
|
+
"sphinx-click>=5.0.1",
|
|
158
|
+
"sphinx-toolbox>=3.5.0",
|
|
159
|
+
"sphinx-design>=0.5.0",
|
|
160
|
+
"sphinxcontrib-mermaid>=0.9.2",
|
|
161
|
+
"auto-pytabs[sphinx]>=0.4.0",
|
|
101
162
|
]
|
|
102
163
|
features = [
|
|
103
164
|
"oracle",
|
|
@@ -135,11 +196,9 @@ no-cov = "cov --no-cov"
|
|
|
135
196
|
[tool.hatch.envs.docs]
|
|
136
197
|
extra-dependencies = [
|
|
137
198
|
# tests
|
|
138
|
-
"nodeenv",
|
|
139
|
-
# required test dependencies
|
|
140
|
-
"cython",
|
|
141
199
|
"anyio",
|
|
142
200
|
"coverage[toml]>=6.2",
|
|
201
|
+
"coverage[toml]>=6.2",
|
|
143
202
|
"pytest",
|
|
144
203
|
"pytest-cov",
|
|
145
204
|
"pytest-mock",
|
|
@@ -147,7 +206,19 @@ extra-dependencies = [
|
|
|
147
206
|
"pytest-sugar",
|
|
148
207
|
"pytest-click",
|
|
149
208
|
"pytest-xdist",
|
|
150
|
-
#
|
|
209
|
+
# lint
|
|
210
|
+
"mypy",
|
|
211
|
+
"ruff",
|
|
212
|
+
"pylint",
|
|
213
|
+
"pre-commit",
|
|
214
|
+
"types-click",
|
|
215
|
+
"types-six",
|
|
216
|
+
"types-decorator",
|
|
217
|
+
"types-pyyaml",
|
|
218
|
+
"asyncpg-stubs",
|
|
219
|
+
"types-docutils",
|
|
220
|
+
"types-redis",
|
|
221
|
+
# docs
|
|
151
222
|
"sphinx>=7.1.2",
|
|
152
223
|
"sphinx-autobuild>=2021.3.14",
|
|
153
224
|
"sphinx-copybutton>=0.5.2",
|
|
@@ -190,11 +261,9 @@ build-check = ["build", "validate"]
|
|
|
190
261
|
[tool.hatch.envs.local]
|
|
191
262
|
extra-dependencies = [
|
|
192
263
|
# tests
|
|
193
|
-
"nodeenv",
|
|
194
|
-
# required test dependencies
|
|
195
|
-
"cython",
|
|
196
264
|
"anyio",
|
|
197
265
|
"coverage[toml]>=6.2",
|
|
266
|
+
"coverage[toml]>=6.2",
|
|
198
267
|
"pytest",
|
|
199
268
|
"pytest-cov",
|
|
200
269
|
"pytest-mock",
|
|
@@ -202,21 +271,7 @@ extra-dependencies = [
|
|
|
202
271
|
"pytest-sugar",
|
|
203
272
|
"pytest-click",
|
|
204
273
|
"pytest-xdist",
|
|
205
|
-
#
|
|
206
|
-
"sphinx>=7.1.2",
|
|
207
|
-
"sphinx-autobuild>=2021.3.14",
|
|
208
|
-
"sphinx-copybutton>=0.5.2",
|
|
209
|
-
"litestar-sphinx-theme @ git+https://github.com/litestar-org/litestar-sphinx-theme.git",
|
|
210
|
-
"sphinx-click>=5.0.1",
|
|
211
|
-
"sphinx-toolbox>=3.5.0",
|
|
212
|
-
"sphinx-design>=0.5.0",
|
|
213
|
-
"sphinxcontrib-mermaid>=0.9.2",
|
|
214
|
-
"auto-pytabs[sphinx]>=0.4.0",
|
|
215
|
-
# cli databasae brwoser
|
|
216
|
-
"harlequin",
|
|
217
|
-
# linting
|
|
218
|
-
"cython",
|
|
219
|
-
"anyio",
|
|
274
|
+
# lint
|
|
220
275
|
"mypy",
|
|
221
276
|
"ruff",
|
|
222
277
|
"pylint",
|
|
@@ -228,6 +283,16 @@ extra-dependencies = [
|
|
|
228
283
|
"asyncpg-stubs",
|
|
229
284
|
"types-docutils",
|
|
230
285
|
"types-redis",
|
|
286
|
+
# docs
|
|
287
|
+
"sphinx>=7.1.2",
|
|
288
|
+
"sphinx-autobuild>=2021.3.14",
|
|
289
|
+
"sphinx-copybutton>=0.5.2",
|
|
290
|
+
"litestar-sphinx-theme @ git+https://github.com/litestar-org/litestar-sphinx-theme.git",
|
|
291
|
+
"sphinx-click>=5.0.1",
|
|
292
|
+
"sphinx-toolbox>=3.5.0",
|
|
293
|
+
"sphinx-design>=0.5.0",
|
|
294
|
+
"sphinxcontrib-mermaid>=0.9.2",
|
|
295
|
+
"auto-pytabs[sphinx]>=0.4.0",
|
|
231
296
|
]
|
|
232
297
|
features = [
|
|
233
298
|
"oracle",
|
|
@@ -249,11 +314,19 @@ type = "virtual"
|
|
|
249
314
|
|
|
250
315
|
# Lint environment
|
|
251
316
|
[tool.hatch.envs.lint]
|
|
252
|
-
detached = true
|
|
253
317
|
extra-dependencies = [
|
|
254
|
-
|
|
255
|
-
"cython",
|
|
318
|
+
# tests
|
|
256
319
|
"anyio",
|
|
320
|
+
"coverage[toml]>=6.2",
|
|
321
|
+
"coverage[toml]>=6.2",
|
|
322
|
+
"pytest",
|
|
323
|
+
"pytest-cov",
|
|
324
|
+
"pytest-mock",
|
|
325
|
+
"pytest-vcr",
|
|
326
|
+
"pytest-sugar",
|
|
327
|
+
"pytest-click",
|
|
328
|
+
"pytest-xdist",
|
|
329
|
+
# lint
|
|
257
330
|
"mypy",
|
|
258
331
|
"ruff",
|
|
259
332
|
"pylint",
|
|
@@ -265,21 +338,18 @@ extra-dependencies = [
|
|
|
265
338
|
"asyncpg-stubs",
|
|
266
339
|
"types-docutils",
|
|
267
340
|
"types-redis",
|
|
341
|
+
# docs
|
|
342
|
+
"sphinx>=7.1.2",
|
|
343
|
+
"sphinx-autobuild>=2021.3.14",
|
|
344
|
+
"sphinx-copybutton>=0.5.2",
|
|
345
|
+
"litestar-sphinx-theme @ git+https://github.com/litestar-org/litestar-sphinx-theme.git",
|
|
346
|
+
"sphinx-click>=5.0.1",
|
|
347
|
+
"sphinx-toolbox>=3.5.0",
|
|
348
|
+
"sphinx-design>=0.5.0",
|
|
349
|
+
"sphinxcontrib-mermaid>=0.9.2",
|
|
350
|
+
"auto-pytabs[sphinx]>=0.4.0",
|
|
268
351
|
]
|
|
269
|
-
|
|
270
|
-
"oracle",
|
|
271
|
-
"mysql",
|
|
272
|
-
"mssql",
|
|
273
|
-
"postgres",
|
|
274
|
-
"spanner",
|
|
275
|
-
"cockroachdb",
|
|
276
|
-
"redis",
|
|
277
|
-
"elasticsearch7",
|
|
278
|
-
"elasticsearch8",
|
|
279
|
-
"bigquery",
|
|
280
|
-
]
|
|
281
|
-
python = "3.11"
|
|
282
|
-
template = "docs"
|
|
352
|
+
python = "3.12"
|
|
283
353
|
type = "virtual"
|
|
284
354
|
|
|
285
355
|
[tool.hatch.envs.lint.scripts]
|
|
@@ -515,6 +585,10 @@ lint.ignore = [
|
|
|
515
585
|
"COM812",
|
|
516
586
|
"PLR0917",
|
|
517
587
|
"CPY001", # copywrite check
|
|
588
|
+
"DOC201", # `return` is not documented in docstring
|
|
589
|
+
"DOC501", # Raised exception missing from docstring
|
|
590
|
+
"DOC502", # Raised exception missing from docstring
|
|
591
|
+
"A005", # module shadows builtin
|
|
518
592
|
]
|
|
519
593
|
lint.select = ["ALL"]
|
|
520
594
|
# Allow unused variables when underscore-prefixed.
|
|
@@ -4,22 +4,21 @@ import asyncio
|
|
|
4
4
|
import os
|
|
5
5
|
import re
|
|
6
6
|
import subprocess # noqa: S404
|
|
7
|
-
import sys
|
|
8
7
|
import timeit
|
|
9
8
|
from typing import TYPE_CHECKING, Any, Callable, Iterable
|
|
10
9
|
|
|
11
|
-
import pytest
|
|
12
|
-
|
|
13
10
|
from pytest_databases.helpers import simple_string_hash, wrap_sync
|
|
14
11
|
|
|
15
12
|
if TYPE_CHECKING:
|
|
16
13
|
from collections.abc import Awaitable, Generator
|
|
17
14
|
from pathlib import Path
|
|
18
15
|
|
|
16
|
+
TRUE_VALUES = {"True", "true", "1", "yes", "Y", "T"}
|
|
17
|
+
|
|
19
18
|
|
|
20
19
|
async def wait_until_responsive(
|
|
21
20
|
check: Callable[..., Awaitable],
|
|
22
|
-
timeout: float,
|
|
21
|
+
timeout: float, # noqa: ASYNC109
|
|
23
22
|
pause: float,
|
|
24
23
|
**kwargs: Any,
|
|
25
24
|
) -> None:
|
|
@@ -43,8 +42,8 @@ async def wait_until_responsive(
|
|
|
43
42
|
raise RuntimeError(msg)
|
|
44
43
|
|
|
45
44
|
|
|
46
|
-
SKIP_DOCKER_COMPOSE: bool =
|
|
47
|
-
USE_LEGACY_DOCKER_COMPOSE: bool =
|
|
45
|
+
SKIP_DOCKER_COMPOSE: bool = os.environ.get("SKIP_DOCKER_COMPOSE", "False") in TRUE_VALUES
|
|
46
|
+
USE_LEGACY_DOCKER_COMPOSE: bool = os.environ.get("USE_LEGACY_DOCKER_COMPOSE", "False") in TRUE_VALUES
|
|
48
47
|
COMPOSE_PROJECT_NAME: str = f"pytest-databases-{simple_string_hash(__file__)}"
|
|
49
48
|
|
|
50
49
|
|
|
@@ -88,7 +87,7 @@ class DockerServiceRegistry:
|
|
|
88
87
|
docker_compose_files: list[Path],
|
|
89
88
|
*,
|
|
90
89
|
check: Callable[..., Any],
|
|
91
|
-
timeout: float = 30,
|
|
90
|
+
timeout: float = 30, # noqa: ASYNC109
|
|
92
91
|
pause: float = 0.1,
|
|
93
92
|
**kwargs: Any,
|
|
94
93
|
) -> None:
|
|
@@ -9,12 +9,12 @@ services:
|
|
|
9
9
|
ORACLE_PASSWORD: ${ORACLE_SYSTEM_PASSWORD:-super-secret}
|
|
10
10
|
APP_USER_PASSWORD: ${ORACLE_PASSWORD:-super-secret}
|
|
11
11
|
APP_USER: ${ORACLE_USER:-app}
|
|
12
|
-
|
|
12
|
+
oracle23ai:
|
|
13
13
|
networks:
|
|
14
14
|
- default
|
|
15
15
|
image: gvenzl/oracle-free:23-slim-faststart
|
|
16
16
|
ports:
|
|
17
|
-
- "${
|
|
17
|
+
- "${ORACLE23AI_PORT:-1513}:1521" # use a non-standard port here
|
|
18
18
|
environment:
|
|
19
19
|
ORACLE_PASSWORD: ${ORACLE_SYSTEM_PASSWORD:-super-secret}
|
|
20
20
|
APP_USER_PASSWORD: ${ORACLE_PASSWORD:-super-secret}
|
|
@@ -75,13 +75,13 @@ def oracle18c_service_name() -> str:
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
@pytest.fixture(scope="session")
|
|
78
|
-
def
|
|
78
|
+
def oracle23ai_service_name() -> str:
|
|
79
79
|
return "FREEPDB1"
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
@pytest.fixture(scope="session")
|
|
83
|
-
def oracle_service_name(
|
|
84
|
-
return
|
|
83
|
+
def oracle_service_name(oracle23ai_service_name: str) -> str:
|
|
84
|
+
return oracle23ai_service_name
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
@pytest.fixture(scope="session")
|
|
@@ -90,18 +90,18 @@ def oracle18c_port() -> int:
|
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
@pytest.fixture(scope="session")
|
|
93
|
-
def
|
|
93
|
+
def oracle23ai_port() -> int:
|
|
94
94
|
return 1513
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
@pytest.fixture(scope="session")
|
|
98
98
|
def default_oracle_service_name() -> str:
|
|
99
|
-
return "
|
|
99
|
+
return "oracle23ai"
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
@pytest.fixture(scope="session")
|
|
103
|
-
def oracle_port(
|
|
104
|
-
return
|
|
103
|
+
def oracle_port(oracle23ai_port: int) -> int:
|
|
104
|
+
return oracle23ai_port
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
@pytest.fixture(scope="session")
|
|
@@ -115,11 +115,11 @@ def oracle_docker_ip(oracle_docker_services: DockerServiceRegistry) -> str:
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
@pytest.fixture(autouse=False, scope="session")
|
|
118
|
-
async def
|
|
118
|
+
async def oracle23ai_service(
|
|
119
119
|
oracle_docker_services: DockerServiceRegistry,
|
|
120
120
|
oracle_docker_compose_files: list[Path],
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
oracle23ai_port: int,
|
|
122
|
+
oracle23ai_service_name: str,
|
|
123
123
|
oracle_system_password: str,
|
|
124
124
|
oracle_user: str,
|
|
125
125
|
oracle_password: str,
|
|
@@ -127,16 +127,16 @@ async def oracle23c_service(
|
|
|
127
127
|
os.environ["ORACLE_PASSWORD"] = oracle_password
|
|
128
128
|
os.environ["ORACLE_SYSTEM_PASSWORD"] = oracle_system_password
|
|
129
129
|
os.environ["ORACLE_USER"] = oracle_user
|
|
130
|
-
os.environ["
|
|
131
|
-
os.environ["
|
|
130
|
+
os.environ["ORACLE23AI_SERVICE_NAME"] = oracle23ai_service_name
|
|
131
|
+
os.environ["ORACLE23AI_PORT"] = str(oracle23ai_port)
|
|
132
132
|
await oracle_docker_services.start(
|
|
133
|
-
"
|
|
133
|
+
"oracle23ai",
|
|
134
134
|
docker_compose_files=oracle_docker_compose_files,
|
|
135
135
|
timeout=90,
|
|
136
136
|
pause=1,
|
|
137
137
|
check=oracle_responsive,
|
|
138
|
-
port=
|
|
139
|
-
service_name=
|
|
138
|
+
port=oracle23ai_port,
|
|
139
|
+
service_name=oracle23ai_service_name,
|
|
140
140
|
user=oracle_user,
|
|
141
141
|
password=oracle_password,
|
|
142
142
|
)
|
|
@@ -242,19 +242,19 @@ async def oracle18c_startup_connection(
|
|
|
242
242
|
|
|
243
243
|
|
|
244
244
|
@pytest.fixture(autouse=False, scope="session")
|
|
245
|
-
async def
|
|
246
|
-
|
|
245
|
+
async def oracle23ai_startup_connection(
|
|
246
|
+
oracle23ai_service: DockerServiceRegistry,
|
|
247
247
|
oracle_docker_ip: str,
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
oracle23ai_port: int,
|
|
249
|
+
oracle23ai_service_name: str,
|
|
250
250
|
oracle_user: str,
|
|
251
251
|
oracle_password: str,
|
|
252
252
|
) -> AsyncGenerator[oracledb.AsyncConnection, None]:
|
|
253
253
|
async with oracledb.connect_async(
|
|
254
254
|
host=oracle_docker_ip,
|
|
255
|
-
port=
|
|
255
|
+
port=oracle23ai_port,
|
|
256
256
|
user=oracle_user,
|
|
257
|
-
service_name=
|
|
257
|
+
service_name=oracle23ai_service_name,
|
|
258
258
|
password=oracle_password,
|
|
259
259
|
) as db_connection:
|
|
260
260
|
yield db_connection
|
|
@@ -23,13 +23,13 @@ def test_oracle18c_default_config(
|
|
|
23
23
|
assert oracle18c_port == 1514
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
def
|
|
27
|
-
oracle_user: str, oracle_password: str,
|
|
26
|
+
def test_oracle23ai_default_config(
|
|
27
|
+
oracle_user: str, oracle_password: str, oracle23ai_service_name: str, oracle23ai_port: int
|
|
28
28
|
) -> None:
|
|
29
29
|
assert oracle_user == "app"
|
|
30
30
|
assert oracle_password == "super-secret"
|
|
31
|
-
assert
|
|
32
|
-
assert
|
|
31
|
+
assert oracle23ai_service_name == "FREEPDB1"
|
|
32
|
+
assert oracle23ai_port == 1513
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
def test_oracle_default_config(
|
|
@@ -37,15 +37,15 @@ def test_oracle_default_config(
|
|
|
37
37
|
oracle_password: str,
|
|
38
38
|
oracle_service_name: str,
|
|
39
39
|
oracle_port: int,
|
|
40
|
-
|
|
40
|
+
oracle23ai_port: int,
|
|
41
41
|
default_oracle_service_name: str,
|
|
42
42
|
) -> None:
|
|
43
|
-
assert default_oracle_service_name == "
|
|
43
|
+
assert default_oracle_service_name == "oracle23ai"
|
|
44
44
|
assert oracle_user == "app"
|
|
45
45
|
assert oracle_password == "super-secret"
|
|
46
46
|
assert oracle_service_name == "FREEPDB1"
|
|
47
47
|
assert oracle_port == 1513
|
|
48
|
-
assert oracle_port ==
|
|
48
|
+
assert oracle_port == oracle23ai_port
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
async def test_oracle18c_service(
|
|
@@ -67,18 +67,18 @@ async def test_oracle18c_service(
|
|
|
67
67
|
assert "Hello World!" in res
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
async def
|
|
70
|
+
async def test_oracle23ai_service(
|
|
71
71
|
oracle_docker_ip: str,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
oracle23ai_service: DockerServiceRegistry,
|
|
73
|
+
oracle23ai_service_name: str,
|
|
74
|
+
oracle23ai_port: int,
|
|
75
75
|
oracle_user: str,
|
|
76
76
|
oracle_password: str,
|
|
77
77
|
) -> None:
|
|
78
78
|
conn = oracledb.connect(
|
|
79
79
|
user=oracle_user,
|
|
80
80
|
password=oracle_password,
|
|
81
|
-
dsn=f"{oracle_docker_ip}:{
|
|
81
|
+
dsn=f"{oracle_docker_ip}:{oracle23ai_port!s}/{oracle23ai_service_name}",
|
|
82
82
|
)
|
|
83
83
|
with conn.cursor() as cur:
|
|
84
84
|
cur.execute("SELECT 'Hello World!' FROM dual")
|
|
@@ -106,10 +106,10 @@ async def test_oracle18c_services_after_start(
|
|
|
106
106
|
assert bool(result is not None and result[0][0] == 1)
|
|
107
107
|
|
|
108
108
|
|
|
109
|
-
async def
|
|
110
|
-
|
|
109
|
+
async def test_oracle23ai_services_after_start(
|
|
110
|
+
oracle23ai_startup_connection: oracledb.AsyncConnection,
|
|
111
111
|
) -> None:
|
|
112
|
-
async with
|
|
112
|
+
async with oracle23ai_startup_connection.cursor() as cursor:
|
|
113
113
|
await cursor.execute("CREATE or replace view simple_table as SELECT 1 as the_value from dual")
|
|
114
114
|
await cursor.execute("select * from simple_table")
|
|
115
115
|
result = await cursor.fetchall()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/alloydb_omni.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/cockroachdb.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_databases-0.7.1 → pytest_databases-0.8.0}/src/pytest_databases/docker/elastic_search.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|