def test_detectmoves(): # detect_moves(basenew = None, baseold = None, outfile = None): actual = detect_moves("tests/data/B", "tests/data/A", test_detectmoves_file) expected = [ ('tests/data/A/foo/bar/baz/Greeting.txt', [('tests/data/B/baz/bar/foo/Greeting.txt', 1.0), ('tests/data/B/baz/Greeting.txt', 0.36363636363636365)]) ] assert expected == actual, (expected, actual) loaded = read_input(test_detectmoves_file) assert expected == loaded, (expected, loaded)
def test_saveload(): testdata = [1,2,3,4,5] save_output(test_saveload_file, testdata) loaded_data = read_input(test_saveload_file) assert loaded_data == testdata