import pytest import main @pytest.fixture(autouse=True) def patch_log(monkeypatch): monkeypatch.setattr(main, "log", lambda msg: None) monkeypatch.setattr(main, "logvv", lambda msg: None) def test_shifting_top(): assert main.shifting((2,3), (4,5)) == (2,4) def test_shifting_mid(): assert main.shifting((20,24), (21,49)) == (20,23) def test_shifting_botom(): assert main.shifting((20,26), (21,49)) == (20,27)