()
| 30 | assert_raises(DECORDError, AudioReader, os.path.join(os.path.dirname(__file__), '..', '..', 'test_data', 'video_0.mov'), CTX) |
| 31 | |
| 32 | def test_bytes_io(): |
| 33 | fn = os.path.join(os.path.dirname(__file__), '..', '..', 'cpp', 'audio', 'count_down.mov') |
| 34 | with open(fn, 'rb') as f: |
| 35 | ar = AudioReader(f) |
| 36 | assert ar.shape() == (1, 482240) |
| 37 | ar2 = get_single_channel_reader() |
| 38 | assert np.allclose(ar[10].asnumpy(), ar2[10].asnumpy()) |
| 39 | |
| 40 | def test_resample(): |
| 41 | ar = get_resampled_reader() |
nothing calls this directly
no test coverage detected