More examples and some minor fixes

This commit is contained in:
2023-06-29 00:03:45 +03:00
parent 7d6ba407bd
commit 9bd4ec0ff0
14 changed files with 336 additions and 66 deletions

View File

@ -188,6 +188,16 @@ def test_romans(pattern: str, expected: list):
def test_romans_pcs(pattern: str, expected: list):
assert get_items(zparse(pattern),len(expected)*2,"pitches") == expected*2
@pytest.mark.parametrize(
"pattern,expected",
[
("(0 1 2 3 r)+(1)", [1,2,3,4,None]),
("(0 1 2 3 r)-(0 1 4)", [0, -1, -2, -3, None, 1, 0, -1, -2, None, 4, 3, 2, 1, None])
]
)
def test_operations(pattern: str, expected: list):
assert get_items(zparse(pattern),len(expected)*2,"pitch_class") == expected*2
@pytest.mark.parametrize(
"pattern,expected",
[