check for non-existant rules

This commit is contained in:
Will McGugan
2022-04-20 17:14:57 +01:00
parent 2c85bd97bd
commit 2823718011
3 changed files with 13 additions and 4 deletions

View File

@@ -317,6 +317,13 @@ def test_spacing_add():
Spacing(1, 2, 3, 4) + "foo"
def test_spacing_sub():
assert Spacing(1, 2, 3, 4) - Spacing(5, 6, 7, 8) == Spacing(-4, -4, -4, -4)
with pytest.raises(TypeError):
Spacing(1, 2, 3, 4) - "foo"
def test_split():
assert Region(10, 5, 22, 15).split(10, 5) == (
Region(10, 5, 10, 5),