def test_subrecipe_outputs(self) -> None: assert render_cell( Cell(SubRecipe(Ingredient(SVS("spam")), (SVS("foo"), SVS("bar"))))) == ( '<td class="rg-sub-recipe-outputs">\n' ' <ul class="rg-sub-recipe-output-list">\n' ' <li id="sub-recipe-foo">foo</li>\n' ' <li id="sub-recipe-bar">bar</li>\n' " </ul>\n" "</td>")
def test_edges(self) -> None: assert render_cell( Cell( Ingredient(SVS("spam")), border_top=BorderType.sub_recipe, border_left=BorderType.none, border_bottom=BorderType.sub_recipe, border_right=BorderType.none, ), ) == ('<td class="' "rg-ingredient " "rg-border-left-none " "rg-border-right-none " "rg-border-top-sub-recipe " "rg-border-bottom-sub-recipe" '">spam</td>')
def test_rowspan(self) -> None: assert (render_cell( Cell( Step(SVS("fry"), (Ingredient(SVS("spam")), )), rows=3, ), ) == '<td class="rg-step" rowspan="3">fry</td>')
def test_colspan(self) -> None: assert (render_cell(Cell( Ingredient(SVS("spam")), columns=3, ), ) == '<td class="rg-ingredient" colspan="3">spam</td>')
def test_subrecipe_header(self) -> None: assert (render_cell( Cell(SubRecipe(Ingredient(SVS("spam")), (SVS("foo"), )))) == '<td class="rg-sub-recipe-header">foo</td>')
def test_step(self) -> None: assert (render_cell(Cell(Step( SVS("fry"), (Ingredient(SVS("spam")), )))) == '<td class="rg-step">fry</td>')
def test_reference(self) -> None: assert (render_cell( Cell( Reference(SubRecipe(Ingredient(SVS("spam")), (SVS("foo"), )), 0)) ) == '<td class="rg-reference"><a href="#sub-recipe-foo">foo</a></td>')
def test_ingredient(self) -> None: assert (render_cell(Cell(Ingredient( SVS("spam")))) == '<td class="rg-ingredient">spam</td>')