def test_bad_from_left_lehmer(): with pytest.raises(ValueError): Permutation.from_left_lehmer(-1)
def test_from_left_lehmer(p, code): assert Permutation.from_left_lehmer(code) == p