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
d94c5e1b
Commit
d94c5e1b
authored
Apr 29, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a test case that dotted name resolution should make forward-only progress.
parent
998d48b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
pystache/tests/test_renderengine.py
+13
-0
No files found.
pystache/tests/test_renderengine.py
View file @
d94c5e1b
...
...
@@ -580,3 +580,16 @@ class RenderTests(unittest.TestCase, AssertStringMixin):
expected
=
u' {{foo}} '
self
.
_assert_render
(
expected
,
'{{=$ $=}} {{foo}} '
)
self
.
_assert_render
(
expected
,
'{{=$ $=}} {{foo}} $={{ }}=$'
)
# was yielding u' '.
def
test_dot_notation__forward_progress
(
self
):
"""
Test that dotted name resolution makes "forward-only" progress.
This is equivalent to the test case in the following pull request:
https://github.com/mustache/spec/pull/48
"""
template
=
'{{a.b}} :: {{#c}}{{a}} :: {{a.b}}{{/c}}'
context
=
{
'a'
:
{
'b'
:
'a.b found'
},
'c'
:
{
'a'
:
'a.b not found'
}
}
self
.
_assert_render
(
u'a.b found :: a.b not found :: '
,
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