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
ee07ff5a
Commit
ee07ff5a
authored
Apr 15, 2012
by
Chris Jerdonek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some updates to the test code for moving the examples folder.
parent
be685f38
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
pystache/tests/common.py
+1
-2
pystache/tests/test_locator.py
+3
-3
pystache/tests/test_specloader.py
+1
-1
No files found.
pystache/tests/common.py
View file @
ee07ff5a
...
...
@@ -7,10 +7,9 @@ Provides test-related code that can be used by all tests.
import
os
import
examples
import
pystache
from
pystache
import
defaults
from
pystache.tests
import
examples
# Save a reference to the original function to avoid recursion.
_DEFAULT_TAG_ESCAPE
=
defaults
.
TAG_ESCAPE
...
...
pystache/tests/test_locator.py
View file @
ee07ff5a
...
...
@@ -14,7 +14,7 @@ import unittest
from
pystache.loader
import
Loader
as
Reader
from
pystache.locator
import
Locator
from
pystache.tests.common
import
DATA_DIR
from
pystache.tests.common
import
DATA_DIR
,
EXAMPLES_DIR
from
pystache.tests.data.views
import
SayHello
...
...
@@ -78,13 +78,13 @@ class LocatorTests(unittest.TestCase):
def
test_find_name
(
self
):
locator
=
Locator
()
path
=
locator
.
find_name
(
search_dirs
=
[
'examples'
],
template_name
=
'simple'
)
path
=
locator
.
find_name
(
search_dirs
=
[
EXAMPLES_DIR
],
template_name
=
'simple'
)
self
.
assertEqual
(
os
.
path
.
basename
(
path
),
'simple.mustache'
)
def
test_find_name__using_list_of_paths
(
self
):
locator
=
Locator
()
path
=
locator
.
find_name
(
search_dirs
=
[
'doesnt_exist'
,
'examples
'
],
template_name
=
'simple'
)
path
=
locator
.
find_name
(
search_dirs
=
[
EXAMPLES_DIR
,
'doesnt_exist
'
],
template_name
=
'simple'
)
self
.
assertTrue
(
path
)
...
...
pystache/tests/test_specloader.py
View file @
ee07ff5a
...
...
@@ -45,7 +45,7 @@ class ViewTestCase(unittest.TestCase, AssertStringMixin):
self
.
assertRaises
(
IOError
,
renderer
.
render
,
view
)
# TODO: change this test to remove the following brittle line.
view
.
template_rel_directory
=
"
../../
examples"
view
.
template_rel_directory
=
"examples"
actual
=
renderer
.
render
(
view
)
self
.
assertEqual
(
actual
,
"No tags..."
)
...
...
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