Fixed Subdivision in normal repeats
This commit is contained in:
@ -91,6 +91,21 @@ def test_subdivisions(pattern: str, expected: list):
|
||||
def test_repeats(pattern: str, expected: list):
|
||||
assert collect(zparse(pattern),len(expected)*2,"note") == expected*2
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"pattern,expected",
|
||||
[
|
||||
("[: 3 [2 4] :]", [0.25, 0.125, 0.125, 0.25, 0.125, 0.125]),
|
||||
("[: 1 [2 [5 6]] 3 [2 4] :]", [0.25, 0.125, 0.0625, 0.0625, 0.25, 0.125, 0.125, 0.25, 0.125, 0.0625, 0.0625, 0.25, 0.125, 0.125]),
|
||||
("(: 3 [2 4] :)", [0.25, 0.125, 0.125, 0.25, 0.125, 0.125]),
|
||||
("(: 1 [2 [5 6]] 3 [2 4] :)", [0.25, 0.125, 0.0625, 0.0625, 0.25, 0.125, 0.125, 0.25, 0.125, 0.0625, 0.0625, 0.25, 0.125, 0.125]),
|
||||
("(3 [2 4]):2", [0.25, 0.125, 0.125, 0.25, 0.125, 0.125]),
|
||||
("(1 [2 [5 6]] 3 [2 4]):2", [0.25, 0.125, 0.0625, 0.0625, 0.25, 0.125, 0.125, 0.25, 0.125, 0.0625, 0.0625, 0.25, 0.125, 0.125]),
|
||||
|
||||
]
|
||||
)
|
||||
def test_repeat_durations(pattern: str, expected: list):
|
||||
assert collect(zparse(pattern),len(expected)*2,"duration") == expected*2
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"pattern,expected",
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user