Skip to content
Snippets Groups Projects
Commit 8fe6ac59 authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Fix errorformatter test for Python 2/3 compatability.

Refs #21251
parent 9621a648
No related branches found
No related tags found
No related merge requests found
...@@ -62,8 +62,10 @@ foo() ...@@ -62,8 +62,10 @@ foo()
# stacktrace will contain file names that are not portable so don't do equality check # stacktrace will contain file names that are not portable so don't do equality check
error_lines = error.splitlines() error_lines = error.splitlines()
# python 3 has a slightly different format of the exception error so just check it looks
# approximate correct
expected_lines = [ expected_lines = [
"NameError: global name '_local' is not defined", "NameError:.*'_local'.*",
' File ".*test_errorformatter.py", line 56, in test_standard_exception', ' File ".*test_errorformatter.py", line 56, in test_standard_exception',
' exec(.*)', ' exec(.*)',
' File "<string>", line 8, in <module>', ' File "<string>", line 8, in <module>',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment