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

Method test_replace_two

test/ext/test_orderinglist.py:395–408  ·  test/ext/test_orderinglist.py::OrderingListTest.test_replace_two

test #3191

(self)

Source from the content-addressed store, hash-verified

393 self.assert_(srt.bullets[2].text == class="st">"3")
394
395 def test_replace_two(self):
396 class="st">""class="st">"test class="cm">#3191"class="st">""
397
398 self._setup(ordering_list(class="st">"position", reorder_on_append=True))
399
400 s1 = Slide(class="st">"Slide class="cm">#1")
401
402 b1, b2, b3, b4 = Bullet(class="st">"1"), Bullet(class="st">"2"), Bullet(class="st">"3"), Bullet(class="st">"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