How to use the pywaffle.waffle.flip_lines function in pywaffle

To help you get started, we’ve selected a few pywaffle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gyli / PyWaffle / tests / test_utilities.py View on Github external
def test_flip_lines(self):
        self.assertEqual(
            list(flip_lines(matrix=[(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2)], base=3)),
            [(0, 0), (0, 1), (0, 2), (1, 2), (1, 1), (1, 0)],
        )
        self.assertEqual(
            list(flip_lines(matrix=[], base=3)),
            [],
        )
        self.assertEqual(
            list(flip_lines(matrix=[(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2)], base=0)),
            [],
        )