diff --git a/tests/test_model_bind.py b/tests/test_model_bind.py index 7c633c83..e31d33b2 100644 --- a/tests/test_model_bind.py +++ b/tests/test_model_bind.py @@ -1,6 +1,8 @@ from __future__ import annotations +import pytest import sqlalchemy as sa +import sqlalchemy.orm as sa_orm from flask_sqlalchemy import SQLAlchemy @@ -76,6 +78,9 @@ class User(db.Model): def test_explicit_table(db: SQLAlchemy) -> None: + if issubclass(db.Model, (sa_orm.MappedAsDataclass)): + pytest.skip("Explicit table binding with mapped dataclasses not supported") + user_table = db.Table( "user", sa.Column("id", sa.Integer, primary_key=True),