def test_circular_shift(): """Test circular shifting of samples.""" d = Data() d.generate_mute_data() n = 20 max_shift = 10 [perm, shift] = d._circular_shift(n, max_shift) assert perm[0] == (n - shift), 'First index after circular shift is wrong!' assert shift <= max_shift, 'Actual shift exceeded max_shift.' assert perm.shape[0] == n, 'Incorrect length of permuted indices.'