def test_error_bubbling(): sha_table_stmts = { 'sha': diffing.diff(ARGS, *map(sqlparse.parse, MOD_COLUMN)) } errors = ref_diff.extract_errors(sha_table_stmts) manual = {'sha': {'t1': ['hello']}} remaining = ref_diff.try_repair_errors(errors, manual, sha_table_stmts) assert not remaining assert sha_table_stmts['sha']['t1'] == ['hello']
def diff_parse(stmts): "wrapper helper" return diffing.diff(ARGS, *map(sqlparse.parse, stmts))