pigeon-magnet-solver/tests/test_helpers.py

17 lines
586 B
Python

from pigeon_magnet_solver import helpers
def test_rotate_r():
assert helpers._rotate_r("1x01") == "11x0"
assert helpers._rotate_r("11x0") == "011x"
assert helpers._rotate_r("011x") == "x011"
assert helpers._rotate_r("x011") == "1x01"
assert helpers._valid_rotate("1x01", "11x0") is False
assert helpers._valid_rotate("1x01", "011x") is False
assert helpers._valid_rotate("1x01", "x011") is True
assert helpers._valid_rotate("1x01", "1x01") is True
assert helpers._fix_exes("1x01", "x011") == "0x11"
assert helpers.rotate_r("1x01") == "0x11"