Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.template
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos.recipe.template
Commits
40270cb5
Commit
40270cb5
authored
Jul 03, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests
parent
6219b5dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
51 deletions
+15
-51
setup.py
setup.py
+3
-0
slapos/recipe/template/README.jinja2.txt
slapos/recipe/template/README.jinja2.txt
+6
-37
slapos/recipe/template/README.txt
slapos/recipe/template/README.txt
+1
-13
slapos/recipe/template/tests.py
slapos/recipe/template/tests.py
+5
-1
No files found.
setup.py
View file @
40270cb5
...
...
@@ -28,6 +28,9 @@ setup(name=name,
'zc.buildout'
,
# plays with buildout
'jinja2>=2.7'
,
],
tests_require
=
[
'zope.testing'
,
],
zip_safe
=
True
,
entry_points
=
{
'zc.buildout'
:
[
...
...
slapos/recipe/template/README.jinja2.txt
View file @
40270cb5
...
...
@@ -48,8 +48,6 @@ We run buildout::
>>> print system(join('bin', 'buildout')),
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
And the template has been rendered::
...
...
@@ -182,8 +180,6 @@ Use jinja2 extensions
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('foo')
foo, template
...
...
@@ -211,8 +207,6 @@ Compute template's MD5 sum::
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('foo')
template
...
...
@@ -232,12 +226,10 @@ If the md5sum doesn't match, the buildout fail::
... md5sum = 0123456789abcdef0123456789abcdef
... ''')
>>> print system(join('bin', 'buildout')),
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
Uninstalling template.
Installing template.
While:
Installing.
Getting section template.
Initializing section template.
Installing template.
Error: MD5 checksum mismatch for local resource at 'foo.in'.
...
...
@@ -260,10 +252,7 @@ You can specify the mode for rendered file::
... mode = 205
... ''')
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
And the generated file with have the right permissions::
...
...
@@ -302,8 +291,6 @@ imported::
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('bar')
FOO !
...
...
@@ -325,8 +312,6 @@ Just like context definition, it also works with indirect values::
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('bar')
FOO !
...
...
@@ -371,8 +356,6 @@ All templates can be accessed inside both folders::
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('bar')
a1foo
a2foo
...
...
@@ -411,8 +394,6 @@ path)::
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('bar')
a1foo
a2foo
...
...
@@ -446,8 +427,6 @@ will be installed as dependency::
foobar='dependency content'
recipe='zc.buildout:debug'
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
This way you can get options which are computed in the ``__init__`` of
the dependent recipe.
...
...
@@ -496,13 +475,11 @@ Let's just use ``buildout.cfg`` using this egg::
... recipe = samplerecipe
... ''')
>>> print system(join('bin', 'buildout')),
Develop:
...
Develop:
'/sample-buildout/.'
Uninstalling template.
Uninstalling dependency.
Installing sample.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('foo')
foobar
...
...
@@ -527,18 +504,14 @@ rendering.
... rendered = foo_once
... once = foo_flag
... ''')
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
# doctest: +ELLIPSIS
Uninstalling template.
Uninstalling sample.
Getting distribution for 'samplerecipe'.
Got samplerecipe 0.0.0.
Installing template.
The template install returned None. A path or iterable os paths should be returned.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../samplerecipe/
Not found: /tmp/.../samplerecipe/
warning: install_lib: 'build/lib' does not exist -- no Python modules to install
warning: install_lib: '...' does not exist -- no Python modules to install
<BLANKLINE>
zip_safe flag not set; analyzing archive contents...
...
...
@@ -562,8 +535,6 @@ Remove rendered file and re-render::
Installing template.
The template install returned None. A path or iterable os paths should be returned.
Unused options for template: 'extra'.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
Template was not rendered::
...
...
@@ -579,8 +550,6 @@ Removing the canary allows template to be re-rendered::
Installing template.
The template install returned None. A path or iterable os paths should be returned.
Unused options for template: 'extra'.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('foo_once')
dummy
slapos/recipe/template/README.txt
View file @
40270cb5
...
...
@@ -28,8 +28,6 @@ We run buildout::
>>> print system(join('bin', 'buildout')),
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
And the output file has been parsed by buildout itself::
...
...
@@ -78,8 +76,6 @@ And run buildout, and see the result::
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('template.out')
template
...
...
@@ -98,8 +94,6 @@ If the md5sum doesn't match, the buildout fail::
... md5sum = 0123456789abcdef0123456789abcdef
... ''')
>>> print system(join('bin', 'buildout')),
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
While:
Installing.
Getting section template.
...
...
@@ -129,8 +123,6 @@ You can specify the mode of the written file::
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
And the generated file with have the right permissions::
...
...
@@ -166,8 +158,6 @@ will be installed as dependency::
foobar='dependency content'
recipe='zc.buildout:debug'
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
This way you can get options which are computed in the ``__init__`` of
the dependent recipe.
...
...
@@ -215,12 +205,10 @@ Let's just use ``buildout.cfg`` using this egg::
... recipe = samplerecipe
... ''')
>>> print system(join('bin', 'buildout')),
Develop:
...
Develop:
'/sample-buildout/.'
Uninstalling template.
Uninstalling dependency.
Installing sample.
Installing template.
Not found: /tmp/.../zc.buildout/
Not found: /tmp/.../zc.buildout/
>>> cat('template.out')
foobar
slapos/recipe/template/tests.py
View file @
40270cb5
...
...
@@ -27,6 +27,7 @@
import
doctest
import
unittest
from
zc.buildout
import
testing
from
zope.testing
import
renormalizing
def
setUp
(
test
):
testing
.
buildoutSetUp
(
test
)
...
...
@@ -38,7 +39,10 @@ def test_suite():
filename
,
setUp
=
setUp
,
tearDown
=
testing
.
buildoutTearDown
,
optionflags
=
(
doctest
.
ELLIPSIS
|
doctest
.
NORMALIZE_WHITESPACE
),
checker
=
renormalizing
.
RENormalizing
((
testing
.
normalize_path
,
testing
.
not_found
,
)),
)
for
filename
in
[
'README.txt'
,
'README.jinja2.txt'
,
...
...
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