MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / test_notsane_warning

Method test_notsane_warning

test/orm/test_versioning.py:181–196  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

179
180 @engines.close_open_connections
181 def test_notsane_warning(self):
182 Foo = self.classes.Foo
183
184 save = testing.db.dialect.supports_sane_rowcount
185 testing.db.dialect.supports_sane_rowcount = False
186 try:
187 s1 = self._fixture()
188 f1 = Foo(value="f1")
189 f2 = Foo(value="f2")
190 s1.add_all((f1, f2))
191 s1.commit()
192
193 f1.value = "f1rev2"
194 assert_warns(sa.exc.SAWarning, s1.commit)
195 finally:
196 testing.db.dialect.supports_sane_rowcount = save
197
198 @provision.allow_stale_updates
199 def test_basic(self):

Callers

nothing calls this directly

Calls 5

_fixtureMethod · 0.95
assert_warnsFunction · 0.90
FooClass · 0.70
add_allMethod · 0.45
commitMethod · 0.45

Tested by

no test coverage detected