Skip to content
Snippets Groups Projects
Commit 73a9d804 authored by Mike Bayer's avatar Mike Bayer
Browse files

run the lexer test through combination pytidy/manual cleanup, to at

least remove huge lines
parent 7b988e4f
No related branches found
No related tags found
No related merge requests found
from mako.template import Template
import unittest, os
from mako.util import function_named, py3k
import re
from nose import SkipTest
......@@ -67,6 +68,14 @@ def assert_raises(except_cls, callable_, *args, **kw):
# assert outside the block so it works for AssertionError too !
assert success, "Callable did not raise an exception"
def assert_raises_message(except_cls, msg, callable_, *args, **kwargs):
try:
callable_(*args, **kwargs)
assert False, "Callable did not raise an exception"
except except_cls, e:
assert re.search(msg, str(e)), "%r !~ %s" % (msg, e)
print str(e)
def skip_if(predicate, reason=None):
"""Skip a test if predicate is true."""
reason = reason or predicate.__name__
......
This diff is collapsed.
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