()
| 95 | assert np.allclose(frame_ts[:,0], [0.0, 0.03125, 0.0625, 0.09375]), frame_ts[:,0] |
| 96 | |
| 97 | def test_bytes_io(): |
| 98 | fn = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'examples', 'flipping_a_pancake.mkv')) |
| 99 | with open(fn, 'rb') as f: |
| 100 | vr = VideoReader(f) |
| 101 | assert len(vr) == 310 |
| 102 | vr2 = _get_default_test_video() |
| 103 | assert np.mean(np.abs(vr[10].asnumpy().astype('float') - vr2[10].asnumpy().astype('float'))) < 2 # average pixel diff < 2 |
| 104 | |
| 105 | |
| 106 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected