Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fuchsia.googlesource.com-third_party-mako
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fuchsia-mirror
fuchsia.googlesource.com-third_party-mako
Commits
73a9d804
Commit
73a9d804
authored
14 years ago
by
Mike Bayer
Browse files
Options
Downloads
Patches
Plain Diff
run the lexer test through combination pytidy/manual cleanup, to at
least remove huge lines
parent
7b988e4f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/__init__.py
+9
-0
9 additions, 0 deletions
test/__init__.py
test/test_lexer.py
+418
-216
418 additions, 216 deletions
test/test_lexer.py
with
427 additions
and
216 deletions
test/__init__.py
+
9
−
0
View file @
73a9d804
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.
Click to expand it.
test/test_lexer.py
+
418
−
216
View file @
73a9d804
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment