Skip to content

Commit 1a13799

Browse files
committed
try fix postgres CI
1 parent c3914f4 commit 1a13799

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

justfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ install-docs:
2929
poetry install --with docs
3030

3131
install-psycopg2:
32+
poetry run pip uninstall -y psycopg
3233
poetry install --with psycopg2
3334

3435
install-psycopg3:
36+
poetry run pip uninstall -y psycopg2
3537
poetry install --with psycopg3
3638

3739
install-mysql:

tests/verify_environment.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ def test():
5757
expected_version
5858
== get_postgresql_version()[: len(expected_version)]
5959
)
60+
if expected_client == "psycopg3":
61+
import psycopg
62+
63+
assert psycopg.__version__[0] == "3"
64+
else:
65+
import psycopg2
66+
67+
assert psycopg2.__version__[0] == "2"
6068
assert find_spec(expected_client), f"{expected_client} not installed"
6169
elif rdbms == "mysql":
6270
pass

0 commit comments

Comments
 (0)