Exclude not critical test (#2)
* Exclude not critical test * Add exclude-tests option * Update documentation * Clean forgotten print * Improve Readme, with examples
This commit is contained in:
1 parent
e93d4ec4c7
commit
8eede82a38
4 files changed
+59
-4
No files matched your search
@@ -70,11 +70,11 @@ migration_tests = (
|
||||
)
|
||||
|
||||
|
||||
def analyse_sql_statements(sql_statements):
|
||||
def analyse_sql_statements(sql_statements, exclude_tests):
|
||||
errors = []
|
||||
for statement in sql_statements:
|
||||
for test in migration_tests:
|
||||
if test["fn"](statement, errors=errors):
|
||||
if test["code"] not in exclude_tests and test["fn"](statement, errors=errors):
|
||||
logger.debug("Testing {0} -- ERROR".format(statement))
|
||||
table_search = re.search("TABLE `([^`]*)`", statement, re.IGNORECASE)
|
||||
col_search = re.search("COLUMN `([^`]*)`", statement, re.IGNORECASE)
|
||||
|
||||
Reference in new issue
Block a user