Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pystache_custom
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
pystache_custom
Commits
dabcc10c
Commit
dabcc10c
authored
Jan 01, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue_36' into development: closing issue #36
parents
14bc1cc6
469c49ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
tests/test_renderengine.py
+19
-3
No files found.
tests/test_renderengine.py
View file @
dabcc10c
...
...
@@ -283,7 +283,7 @@ class RenderTests(unittest.TestCase):
"""
template
=
'{{=[[ ]]=}}[[#foo]]bar[[/foo]]'
context
=
{
'foo'
:
True
}
self
.
_assert_render
(
u
"bar"
,
template
,
context
)
self
.
_assert_render
(
u
'bar'
,
template
,
context
)
def
test_custom_delimiters__not_retroactive
(
self
):
"""
...
...
@@ -306,6 +306,22 @@ class RenderTests(unittest.TestCase):
prevent regressions for those who don't pull down the spec tests.
"""
template
=
"| A {{#bool}}B {{#bool}}C{{/bool}} D{{/bool}} E |"
template
=
'| A {{#bool}}B {{#bool}}C{{/bool}} D{{/bool}} E |'
context
=
{
'bool'
:
True
}
self
.
_assert_render
(
u"| A B C D E |"
,
template
,
context
)
self
.
_assert_render
(
u'| A B C D E |'
,
template
,
context
)
def
test_sections__nested_with_same_keys
(
self
):
"""
Check a doubly-nested section with the same context key.
Test case for issue #36: https://github.com/defunkt/pystache/issues/36
"""
# Start with an easier, working case.
template
=
'{{#x}}{{#z}}{{y}}{{/z}}{{/x}}'
context
=
{
'x'
:
{
'z'
:
{
'y'
:
1
}}}
self
.
_assert_render
(
u'1'
,
template
,
context
)
template
=
'{{#x}}{{#x}}{{y}}{{/x}}{{/x}}'
context
=
{
'x'
:
{
'x'
:
{
'y'
:
1
}}}
self
.
_assert_render
(
u'1'
,
template
,
context
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment