Skip to content

Commit

Permalink
Additional test coverage and fix psycopg3 failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Apr 9, 2024
1 parent e896704 commit 717e2fb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.9, "3.10"]
python-version: [3.7, 3.9, "3.11"]
peewee-backend:
- "sqlite"
- "postgresql"
Expand All @@ -35,8 +35,10 @@ jobs:
include:
- python-version: 3.7
peewee-backend: cockroachdb
- python-version: "3.10"
- python-version: "3.11"
peewee-backend: cockroachdb
- python-version: "3.11"
peewee-backend: psycopg3
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand All @@ -48,7 +50,7 @@ jobs:
PGHOST: 127.0.0.1
PGPASSWORD: peewee
run: |
pip install psycopg2-binary cython pymysql 'apsw<3.38' mysql-connector
pip install psycopg2-binary cython pymysql 'apsw' mysql-connector
python setup.py build_ext -i
psql peewee_test -c 'CREATE EXTENSION hstore;'
- name: sqlcipher
Expand Down
1 change: 1 addition & 0 deletions tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def get_in_memory_db(**params):
IS_MYSQL = BACKEND.startswith(('mysql', 'maria'))
IS_POSTGRESQL = BACKEND.startswith(('postgres', 'psycopg'))
IS_CRDB = BACKEND in ('cockroach', 'cockroachdb', 'crdb')
IS_PSYCOPG3 = BACKEND == 'psycopg3'


def make_db_params(key):
Expand Down
2 changes: 2 additions & 0 deletions tests/migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .base import IS_CRDB
from .base import IS_MYSQL
from .base import IS_POSTGRESQL
from .base import IS_PSYCOPG3
from .base import IS_SQLITE
from .base import IS_SQLITE_25
from .base import IS_SQLITE_35
Expand Down Expand Up @@ -331,6 +332,7 @@ class Meta:
def test_rename_gh380_sqlite_legacy(self):
self.test_rename_gh380(legacy=True)

@skip_if(IS_PSYCOPG3, 'Psycopg3 chokes on the default value.')
def test_add_default_drop_default(self):
with self.database.transaction():
migrate(self.migrator.add_column_default('person', 'first_name',
Expand Down

0 comments on commit 717e2fb

Please sign in to comment.