diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-06-03 15:05:39 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-06-03 15:19:22 -0400 |
commit | e96afac261ce835a40680d0d4611626d5dee4cf9 (patch) | |
tree | 3d5064817cff1a1b263d09d6020178f4cf03d584 /test/test_exceptions.py | |
parent | 9f23c60f6db9322311576e13e68d13ddccca38c9 (diff) | |
download | external_python_mako-e96afac261ce835a40680d0d4611626d5dee4cf9.tar.gz external_python_mako-e96afac261ce835a40680d0d4611626d5dee4cf9.tar.bz2 external_python_mako-e96afac261ce835a40680d0d4611626d5dee4cf9.zip |
Remove all non-essential functions from _ast_util.py
As this is an old module that keeps changing with new Python
releases, combined with the fact that we no longer use "import *",
remove all unused functions from this module so that the list
of imports we are maintaining is much shorter.
Python 3.8 is also added to tox.ini with more adjustments to
test_exceptions to accommodate for quoting differences.
Fixes: #296
Change-Id: I0cea7d21ecb2be9335e0845ae7fbd06d468a137b
Diffstat (limited to 'test/test_exceptions.py')
-rw-r--r-- | test/test_exceptions.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/test/test_exceptions.py b/test/test_exceptions.py index c680591..c904d65 100644 --- a/test/test_exceptions.py +++ b/test/test_exceptions.py @@ -195,10 +195,15 @@ ${u'привет'} html_error = exceptions.html_error_template().render() if compat.py3k: assert "RuntimeError: test" in html_error.decode("utf-8") - assert "foo = u("日本")" in html_error.decode("utf-8") + assert "foo = u("日本")" in html_error.decode( + "utf-8" + ) or "foo = u("日本")" in html_error.decode("utf-8") else: assert "RuntimeError: test" in html_error - assert "foo = u("日本")" in html_error + assert ( + "foo = u("日本")" in html_error + or "foo = u("日本")" in html_error + ) def test_py_unicode_error_html_error_template(self): try: @@ -328,7 +333,7 @@ ${foobar} def test_custom_tback(self): try: raise RuntimeError("error 1") - foo("bar") # noqa + foo("bar") # noqa except: t, v, tback = sys.exc_info() @@ -341,7 +346,10 @@ ${foobar} # obfuscate the text so that this text # isn't in the 'wrong' exception - assert "".join(reversed(");touq&rab;touq&(oof")) in html_error + assert ( + "".join(reversed(");touq&rab;touq&(oof")) in html_error + or "".join(reversed(");43#&rab;43#&(oof")) in html_error + ) def test_tback_no_trace_from_py_file(self): try: |