pytest-databases 0.12.1__tar.gz → 0.12.2__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.12.1 → pytest_databases-0.12.2}/PKG-INFO +1 -1
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/pyproject.toml +2 -2
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/oracle.py +30 -6
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_oracle.py +9 -10
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/uv.lock +1 -1
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/.github/CODEOWNERS +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/.github/dependabot.yaml +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/.github/workflows/cd.yaml +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/.github/workflows/ci.yaml +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/.github/workflows/pr-title.yaml +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/.github/workflows/release.yaml +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/.gitignore +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/.pre-commit-config.yaml +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/.sourcery.yaml +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/.vscode/launch.json +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/.vscode/settings.json +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/CODEOWNERS +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/CONTRIBUTING.rst +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/LICENSE +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/Makefile +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/README.md +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/scripts/__init__.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/scripts/build_docs.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/scripts/convert_docs.sh +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/scripts/install-hatch.sh +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/sonar-project.properties +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/__init__.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/__metadata__.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/_service.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/__init__.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/alloydb_omni.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/azure_blob.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/bigquery.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/cockroachdb.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/elastic_search.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/mariadb.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/minio.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/mssql.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/mysql.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/postgres.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/redis.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/spanner.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/helpers.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/py.typed +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/types.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/__init__.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/conftest.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_alloydb_omni.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_azure_blob.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_bigquery.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_cockroachdb.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_elasticsearch.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_mariadb.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_minio.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_mssql.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_mysql.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_postgres.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_redis.py +0 -0
- {pytest_databases-0.12.1 → pytest_databases-0.12.2}/tests/test_spanner.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-databases
|
|
3
|
-
Version: 0.12.
|
|
3
|
+
Version: 0.12.2
|
|
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.9"
|
|
15
|
-
version = "0.12.
|
|
15
|
+
version = "0.12.2"
|
|
16
16
|
#
|
|
17
17
|
authors = [{ name = "Cody Fincher", email = "cody@litestar.dev" }]
|
|
18
18
|
keywords = [
|
|
@@ -117,7 +117,7 @@ dev = [
|
|
|
117
117
|
allow_dirty = true
|
|
118
118
|
commit = true
|
|
119
119
|
commit_args = "--no-verify"
|
|
120
|
-
current_version = "0.12.
|
|
120
|
+
current_version = "0.12.2"
|
|
121
121
|
ignore_missing_files = false
|
|
122
122
|
ignore_missing_version = false
|
|
123
123
|
message = "chore(release): bump to v{new_version}"
|
|
@@ -95,22 +95,46 @@ def _provide_oracle_service(
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
@pytest.fixture(autouse=False, scope="session")
|
|
98
|
-
def
|
|
98
|
+
def oracle_23ai_image() -> str:
|
|
99
|
+
return "gvenzl/oracle-free:23-slim-faststart"
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
@pytest.fixture(autouse=False, scope="session")
|
|
103
|
+
def oracle_23ai_service_name() -> str:
|
|
104
|
+
return "FREEPDB1"
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@pytest.fixture(autouse=False, scope="session")
|
|
108
|
+
def oracle_18c_image() -> str:
|
|
109
|
+
return "gvenzl/oracle-xe:18-slim-faststart"
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
@pytest.fixture(autouse=False, scope="session")
|
|
113
|
+
def oracle_18c_service_name() -> str:
|
|
114
|
+
return "xepdb1"
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@pytest.fixture(autouse=False, scope="session")
|
|
118
|
+
def oracle_23ai_service(
|
|
119
|
+
docker_service: DockerService, oracle_23ai_image: str, oracle_23ai_service_name: str
|
|
120
|
+
) -> Generator[OracleService, None, None]:
|
|
99
121
|
with _provide_oracle_service(
|
|
100
|
-
image=
|
|
122
|
+
image=oracle_23ai_image,
|
|
101
123
|
name="oracle23ai",
|
|
102
|
-
service_name=
|
|
124
|
+
service_name=oracle_23ai_service_name,
|
|
103
125
|
docker_service=docker_service,
|
|
104
126
|
) as service:
|
|
105
127
|
yield service
|
|
106
128
|
|
|
107
129
|
|
|
108
130
|
@pytest.fixture(autouse=False, scope="session")
|
|
109
|
-
def oracle_18c_service(
|
|
131
|
+
def oracle_18c_service(
|
|
132
|
+
docker_service: DockerService, oracle_18c_image: str, oracle_18c_service_name: str
|
|
133
|
+
) -> Generator[OracleService, None, None]:
|
|
110
134
|
with _provide_oracle_service(
|
|
111
|
-
image=
|
|
135
|
+
image=oracle_18c_image,
|
|
112
136
|
name="oracle18c",
|
|
113
|
-
service_name=
|
|
137
|
+
service_name=oracle_18c_service_name,
|
|
114
138
|
docker_service=docker_service,
|
|
115
139
|
) as service:
|
|
116
140
|
yield service
|
|
@@ -2,15 +2,12 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import pytest
|
|
4
4
|
|
|
5
|
-
pytestmark = pytest.mark.skip()
|
|
6
|
-
|
|
7
5
|
|
|
8
6
|
@pytest.mark.parametrize(
|
|
9
7
|
"service_fixture",
|
|
10
8
|
[
|
|
11
9
|
"oracle_18c_service",
|
|
12
10
|
"oracle_23ai_service",
|
|
13
|
-
"oracle_23ai_service",
|
|
14
11
|
],
|
|
15
12
|
)
|
|
16
13
|
def test_service_fixture(pytester: pytest.Pytester, service_fixture: str) -> None:
|
|
@@ -20,21 +17,23 @@ def test_service_fixture(pytester: pytest.Pytester, service_fixture: str) -> Non
|
|
|
20
17
|
|
|
21
18
|
def test({service_fixture}):
|
|
22
19
|
conn = oracledb.connect(
|
|
23
|
-
user=service_fixture.user,
|
|
24
|
-
password=service_fixture.password,
|
|
25
|
-
|
|
20
|
+
user={service_fixture}.user,
|
|
21
|
+
password={service_fixture}.password,
|
|
22
|
+
service_name={service_fixture}.service_name,
|
|
23
|
+
host={service_fixture}.host,
|
|
24
|
+
port={service_fixture}.port,
|
|
26
25
|
)
|
|
27
26
|
with conn.cursor() as cur:
|
|
28
|
-
cur.execute("SELECT
|
|
29
|
-
res = cur.
|
|
30
|
-
assert
|
|
27
|
+
cur.execute("SELECT 1 FROM dual")
|
|
28
|
+
res = cur.fetchone()[0]
|
|
29
|
+
assert res == 1
|
|
31
30
|
""")
|
|
32
31
|
|
|
33
32
|
result = pytester.runpytest()
|
|
34
33
|
result.assert_outcomes(passed=1)
|
|
35
34
|
|
|
36
35
|
|
|
37
|
-
@pytest.mark.parametrize("connection_fixture", ["oracle_18c_connection"])
|
|
36
|
+
@pytest.mark.parametrize("connection_fixture", ["oracle_18c_connection", "oracle_23ai_connection"])
|
|
38
37
|
def test_connection_fixture(pytester: pytest.Pytester, connection_fixture: str) -> None:
|
|
39
38
|
pytester.makepyfile(f"""
|
|
40
39
|
import oracledb
|
|
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
|
{pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/alloydb_omni.py
RENAMED
|
File without changes
|
{pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/azure_blob.py
RENAMED
|
File without changes
|
|
File without changes
|
{pytest_databases-0.12.1 → pytest_databases-0.12.2}/src/pytest_databases/docker/cockroachdb.py
RENAMED
|
File without changes
|
{pytest_databases-0.12.1 → pytest_databases-0.12.2}/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
|