MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_no_table

Method test_no_table

test/orm/test_mapper.py:145–159  ·  view source on GitHub ↗

test new error condition raised for table=None found_during_type_annotation

(self)

Source from the content-addressed store, hash-verified

143 self.mapper(User, users)
144
145 def test_no_table(self):
146 """test new error condition raised for table=None
147
148 found_during_type_annotation
149
150 """
151
152 User = self.classes.User
153
154 with expect_raises_message(
155 sa.exc.ArgumentError,
156 r"Mapper\[User\(None\)\] has None for a primary table "
157 r"argument and does not specify 'inherits'",
158 ):
159 self.mapper(User, None)
160
161 def test_cant_call_legacy_constructor_directly(self):
162 users, User = (

Callers

nothing calls this directly

Calls 2

expect_raises_messageFunction · 0.90
mapperMethod · 0.45

Tested by

no test coverage detected