MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_modified

Method test_modified

test/ext/test_indexable.py:232–249  ·  test/ext/test_indexable.py::IndexPropertyArrayTest.test_modified
(self)

Source from the content-addressed store, hash-verified

230 eq_(a.first, 2)
231
232 def test_modified(self):
233 from sqlalchemy import inspect
234
235 Array = self.classes.Array
236 s = Session(testing.db)
237
238 a = Array(array=[1, 2, 3])
239 s.add(a)
240 s.commit()
241
242 i = inspect(a)
243 is_(i.modified, False)
244 in_(class="st">"array", i.unmodified)
245
246 a.first = 10
247
248 is_(i.modified, True)
249 not_in(class="st">"array", i.unmodified)
250
251
252class IndexPropertyJsonTest(fixtures.DeclarativeMappedTest):

Callers

nothing calls this directly

Calls 8

addMethod · 0.95
commitMethod · 0.95
SessionClass · 0.90
inspectFunction · 0.90
is_Function · 0.90
in_Function · 0.90
not_inFunction · 0.90
ArrayClass · 0.85

Tested by

no test coverage detected