MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_clear

Method test_clear

test/ext/test_mutable.py:615–628  ·  test/ext/test_mutable.py::_MutableListTestBase.test_clear
(self)

Source from the content-addressed store, hash-verified

613 eq_(f1.data, [1, 4])
614
615 def test_clear(self):
616 if not hasattr(list, class="st">"clear"):
617 class="cm"># py2 list doesnclass="st">'t have 'clear'
618 return
619 sess = fixture_session()
620
621 f1 = Foo(data=[1, 2])
622 sess.add(f1)
623 sess.commit()
624
625 f1.data.clear()
626 sess.commit()
627
628 eq_(f1.data, [])
629
630 def test_pop(self):
631 sess = fixture_session()

Callers

nothing calls this directly

Calls 6

fixture_sessionFunction · 0.90
eq_Function · 0.90
FooClass · 0.70
addMethod · 0.45
commitMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected