Пример #1
0
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']
Пример #2
0
def diff_parse(stmts):
    "wrapper helper"
    return diffing.diff(ARGS, *map(sqlparse.parse, stmts))