MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_replace_two

Method test_replace_two

test/ext/test_orderinglist.py:395–408  ·  view source on GitHub ↗

test #3191

(self)

Source from the content-addressed store, hash-verified

393 self.assert_(srt.bullets[2].text == "3")
394
395 def test_replace_two(self):
396 """test #3191"""
397
398 self._setup(ordering_list("position", reorder_on_append=True))
399
400 s1 = Slide("Slide #1")
401
402 b1, b2, b3, b4 = Bullet("1"), Bullet("2"), Bullet("3"), Bullet("4")
403 s1.bullets = [b1, b2, b3]
404
405 eq_([b.position for b in s1.bullets], [0, 1, 2])
406
407 s1.bullets = [b4, b2, b1]
408 eq_([b.position for b in s1.bullets], [0, 1, 2])
409
410 def test_funky_ordering(self):
411 class Pos:

Callers

nothing calls this directly

Calls 5

_setupMethod · 0.95
ordering_listFunction · 0.90
eq_Function · 0.90
SlideClass · 0.70
BulletClass · 0.70

Tested by

no test coverage detected