--- sympy/utilities/tests/test_code_quality.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/sympy/utilities/tests/test_code_quality.py b/sympy/utilities/tests/test_code_quality.py index b2f2e91..621b2a8 100644 --- a/sympy/utilities/tests/test_code_quality.py +++ b/sympy/utilities/tests/test_code_quality.py @@ -18,6 +18,7 @@ message_space = "File contains trailing whitespace: %s, line %s." message_implicit = "File contains an implicit import: %s, line %s." message_tabs = "File contains tabs instead of spaces: %s, line %s." message_carriage = "File contains carriage returns at end of line: %s, line %s" +message_str_raise = "File contains string exceptions: %s, line %s" def get_whitespace(s): """Returns all whitespace at the beginning of the line.""" @@ -31,6 +32,7 @@ def check_directory_tree(base_path): Checks all files in the directory tree (with base_path as starting point) for bad coding style. """ + strRaise = re.compile(r'raise\s+(\(\s*)*(\'|\")') for root, dirs, files in walk(base_path): for fname in glob(join(root, "*.py")): if filter(lambda ex: ex in fname, EXCLUDE): @@ -46,6 +48,8 @@ def check_directory_tree(base_path): w = get_whitespace(line) if w.expandtabs() != w: assert False, message_tabs % (fname, idx+1) + if strRaise.search(line): + assert False, message_str_raise % (fname, idx+1) finally: file.close() -- 1.5.6.5 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-patches" group. To post to this group, send email to sympy-patches@googlegroups.com To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en -~----------~----~----~----~------~----~------~--~---