Commit 24bb21d9 authored by Marco Mariani's avatar Marco Mariani

tests: specify buildout version, test permissions with umask 0

parent 6f236c2b
...@@ -25,7 +25,7 @@ setup(name=name, ...@@ -25,7 +25,7 @@ setup(name=name,
include_package_data=True, include_package_data=True,
install_requires=[ install_requires=[
'setuptools', # namespaces 'setuptools', # namespaces
'zc.buildout', # plays with buildout 'zc.buildout==1.7.1', # plays with buildout
'jinja2 >= 2.7', 'jinja2 >= 2.7',
], ],
zip_safe=True, zip_safe=True,
......
...@@ -225,8 +225,10 @@ If the md5sum doesn't match, the buildout fail:: ...@@ -225,8 +225,10 @@ If the md5sum doesn't match, the buildout fail::
Specify filesystem permissions Specify filesystem permissions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can specify the mode for rendered file:: You can specify the mode for rendered file (according to umask settings)::
>>> import os
>>> old_umask = os.umask(0)
>>> write('template.in', '{{bar}}') >>> write('template.in', '{{bar}}')
>>> write('buildout.cfg', >>> write('buildout.cfg',
... ''' ... '''
...@@ -243,6 +245,8 @@ You can specify the mode for rendered file:: ...@@ -243,6 +245,8 @@ You can specify the mode for rendered file::
>>> print system(join('bin', 'buildout')), >>> print system(join('bin', 'buildout')),
Uninstalling template. Uninstalling template.
Installing template. Installing template.
>>> os.umask(old_umask)
0
And the generated file with have the right permissions:: And the generated file with have the right permissions::
......
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