Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/test_model_bind.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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),
Expand Down
Loading