def test_track(mus): with pytest.raises(ValueError): track = ac.Track(name="test - test", path="None") track.audio with pytest.raises(ValueError): track = ac.Track(name="test - test", path="None") track.rate track.audio = np.zeros((2, 44100)) assert track.audio.shape == (2, 44100) track.rate = 44100 assert track.rate == 44100
def test_track(mus): with pytest.raises(ValueError): track = ac.Track(path="None") track.audio track.audio = np.zeros((2, 44100)) assert track.audio.shape == (2, 44100)
def test_track_artisttitle(mus): source = ac.Track(name="abc123", path="None") assert source.artist is None assert source.title is None