def test_backwards_real(): inp = lab.load_wav(os.path.join(TEST_DIRECTORY, 'sounds', 'hello.wav')) inp2 = copy.deepcopy(inp) outfile = os.path.join(TEST_DIRECTORY, 'test_outputs', 'hello_backwards.wav') compare_against_file(lab.backwards(inp), outfile) assert inp == inp2, 'be careful not to modify the input!'
def test_backwards_small(): inp = { 'rate': 20, 'left': [1,2,3,4,5,6], 'right': [7,6,5,4,3,2], } inp2 = copy.deepcopy(inp) out = { 'rate': 20, 'left': [6,5,4,3,2,1], 'right': [2,3,4,5,6,7], } compare_sounds(lab.backwards(inp), out) assert inp == inp2, 'be careful not to modify the input!'
def test_backwards_random_2(): inps, exp = load_pickle_pair('backwards_02.pickle') inps2 = copy.deepcopy(inps) compare_sounds(lab.backwards(*inps), exp) assert inps == inps2, 'be careful not to modify the input!'