Skip to content

Commit

Permalink
Update tests that do a version compat check for Sqlite migrations.
Browse files Browse the repository at this point in the history
  • Loading branch information
coleifer committed Jan 14, 2024
1 parent c597250 commit b04a7f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def new_connection(**kwargs):
IS_SQLITE_24 = IS_SQLITE and sqlite3.sqlite_version_info >= (3, 24)
IS_SQLITE_25 = IS_SQLITE and sqlite3.sqlite_version_info >= (3, 25)
IS_SQLITE_30 = IS_SQLITE and sqlite3.sqlite_version_info >= (3, 30)
IS_SQLITE_35 = IS_SQLITE and sqlite3.sqlite_version_info >= (3, 35)
IS_SQLITE_37 = IS_SQLITE and sqlite3.sqlite_version_info >= (3, 37)
IS_SQLITE_9 = IS_SQLITE and sqlite3.sqlite_version_info >= (3, 9)
IS_MYSQL_ADVANCED_FEATURES = False
Expand Down
3 changes: 2 additions & 1 deletion tests/migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from .base import IS_POSTGRESQL
from .base import IS_SQLITE
from .base import IS_SQLITE_25
from .base import IS_SQLITE_35
from .base import ModelTestCase
from .base import TestModel
from .base import db
Expand Down Expand Up @@ -261,7 +262,7 @@ def test_drop_column(self, legacy=False):
('charlie',),
('huey',),])

@skip_unless(IS_SQLITE_25, 'Requires sqlite 3.25 or newer')
@skip_unless(IS_SQLITE_35, 'Requires sqlite 3.35 or newer')
def test_drop_column_sqlite_legacy(self):
self.test_drop_column(legacy=True)

Expand Down

0 comments on commit b04a7f0

Please sign in to comment.