def test_fast_options(self): self.assertItemsEqual(["## # ", " ## #"], [picross.line_str(x) for x in picross.options([2, 1], 5, [picross.Cell.UNKNOWN]*5)])
def test_options_split(self): self.assertItemsEqual(["## # ", "## #", " ## #"], [picross.line_str(x) for x in picross.options([2, 1], 5, [picross.Cell.UNKNOWN]*5, full=True)])
def test_options_split_with_content(self): for full in [False, True]: self.assertItemsEqual(["## # ", "## #"], [picross.line_str(x) for x in picross.options([2, 1], 5, [picross.Cell.FULL] + [picross.Cell.UNKNOWN]*4, full=full)]) self.assertItemsEqual(["## #", " ## #"], [picross.line_str(x) for x in picross.options([2, 1], 5, [picross.Cell.UNKNOWN]*4 + [picross.Cell.FULL], full=full)])
def test_options_full(self): self.assertEqual(["#####"], [picross.line_str(x) for x in picross.options([5], 5, [picross.Cell.UNKNOWN]*5, full=True)])