Skip to content

Commit d28d13b

Browse files
committed
test(SimpleDjIA): validate metadata constraints
1 parent d544409 commit d28d13b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎SimpleDjIA/tests/test_models.py‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from pathlib import Path
2+
import pytest
3+
4+
from simple_djia.models import Track
5+
6+
7+
def test_feature_bounds_are_enforced():
8+
with pytest.raises(ValueError):
9+
Track(Path("a.ogg"), "A", energy=1.2)
10+
11+
12+
def test_bpm_bounds_are_enforced():
13+
with pytest.raises(ValueError):
14+
Track(Path("a.ogg"), "A", bpm=500)

0 commit comments

Comments
 (0)