Harden tests, add note about mode limitations.

parent 6f236c2b
...@@ -26,7 +26,7 @@ setup(name=name, ...@@ -26,7 +26,7 @@ setup(name=name,
install_requires=[ install_requires=[
'setuptools', # namespaces 'setuptools', # namespaces
'zc.buildout', # plays with buildout 'zc.buildout', # plays with buildout
'jinja2 >= 2.7', 'jinja2>=2.7',
], ],
zip_safe=True, zip_safe=True,
entry_points={ entry_points={
......
...@@ -238,7 +238,7 @@ You can specify the mode for rendered file:: ...@@ -238,7 +238,7 @@ You can specify the mode for rendered file::
... template = template.in ... template = template.in
... rendered = foo ... rendered = foo
... context = key bar buildout:parts ... context = key bar buildout:parts
... mode = 206 ... mode = 205
... ''') ... ''')
>>> print system(join('bin', 'buildout')), >>> print system(join('bin', 'buildout')),
Uninstalling template. Uninstalling template.
...@@ -249,7 +249,10 @@ And the generated file with have the right permissions:: ...@@ -249,7 +249,10 @@ And the generated file with have the right permissions::
>>> import stat >>> import stat
>>> import os >>> import os
>>> print oct(stat.S_IMODE(os.stat('foo').st_mode)) >>> print oct(stat.S_IMODE(os.stat('foo').st_mode))
0206 0205
Note that Buildout will not allow you to have write permission for others
and will silently remove it (i.e a 207 mode will become 205).
Template imports Template imports
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
......
...@@ -38,7 +38,7 @@ def test_suite(): ...@@ -38,7 +38,7 @@ def test_suite():
filename, filename,
setUp=setUp, setUp=setUp,
tearDown=testing.buildoutTearDown, tearDown=testing.buildoutTearDown,
optionflags=doctest.ELLIPSIS, optionflags=(doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE),
) for filename in [ ) for filename in [
'README.txt', 'README.txt',
'README.jinja2.txt', 'README.jinja2.txt',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment