MCPcopy Create free account
hub / github.com/scanny/python-pptx / iter_fixture

Method iter_fixture

tests/test_table.py:549–561  ·  view source on GitHub ↗
(self, request, _Cell_)

Source from the content-addressed store, hash-verified

547
548 @pytest.fixture(params=["a:tr", "a:tr/a:tc", "a:tr/(a:tc, a:tc, a:tc)"])
549 def iter_fixture(self, request, _Cell_):
550 tr_cxml = request.param
551 tr = element(tr_cxml)
552 tcs = tr.xpath("//a:tc")
553 cell_collection = _CellCollection(tr, None)
554
555 expected_cells = [
556 instance_mock(request, _Cell, name="cell%d" % idx) for idx in range(len(tcs))
557 ]
558 _Cell_.side_effect = expected_cells
559 calls = [call(tc, cell_collection) for tc in tcs]
560
561 return cell_collection, _Cell_, calls, expected_cells
562
563 @pytest.fixture(params=[("a:tr", 0), ("a:tr/a:tc", 1), ("a:tr/(a:tc, a:tc)", 2)])
564 def len_fixture(self, request):

Callers

nothing calls this directly

Calls 4

_CellCollectionClass · 0.90
elementFunction · 0.85
instance_mockFunction · 0.85
xpathMethod · 0.45

Tested by

no test coverage detected