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 1531a1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 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 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 1531a1b

Please sign in to comment.