Commit af89deb8 authored by Xavier Thompson's avatar Xavier Thompson

tests: Make tests work with zc.buildout 3.0.1

parent da394db7
...@@ -24,6 +24,10 @@ TODO: The test is incomplete for 2 reasons: ...@@ -24,6 +24,10 @@ TODO: The test is incomplete for 2 reasons:
... 'pyshow = pyshow:Pyshow', ... 'pyshow = pyshow:Pyshow',
... ], ... ],
... 'zc.buildout.extension': ['ext = extension:extension'],}, ... 'zc.buildout.extension': ['ext = extension:extension'],},
... py_modules = [
... 'pyinstall',
... 'pyshow',
... ]
... ) ... )
... """) ... """)
>>> write(sample_buildout, 'recipes', 'extension.py', >>> write(sample_buildout, 'recipes', 'extension.py',
...@@ -38,7 +42,7 @@ TODO: The test is incomplete for 2 reasons: ...@@ -38,7 +42,7 @@ TODO: The test is incomplete for 2 reasons:
... def __getattr__(self, attr): ... def __getattr__(self, attr):
... return getattr(sys, attr) ... return getattr(sys, attr)
... """) ... """)
>>> print(system(buildout)) >>> print(system(buildout, env={'PYTHONWARNINGS':'ignore'}))
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
<BLANKLINE> <BLANKLINE>
>>> write(sample_buildout, 'buildout.cfg', >>> write(sample_buildout, 'buildout.cfg',
...@@ -58,7 +62,7 @@ Develop: '/sample-buildout/recipes' ...@@ -58,7 +62,7 @@ Develop: '/sample-buildout/recipes'
... recipe = recipes:pyshow ... recipe = recipes:pyshow
... """ % dict(syspython=sys.executable)) ... """ % dict(syspython=sys.executable))
>>> print(system(buildout)) # doctest: +ELLIPSIS >>> print(system(buildout, env={'PYTHONWARNINGS':'ignore'})) # doctest: +ELLIPSIS
slapos.rebootstrap: Make sure that the section 'installpython' won't be reinstalled after rebootstrap. slapos.rebootstrap: Make sure that the section 'installpython' won't be reinstalled after rebootstrap.
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
Installing installpython. Installing installpython.
......
...@@ -2,7 +2,7 @@ Simple case: switch to a Python with same major/minor version ...@@ -2,7 +2,7 @@ Simple case: switch to a Python with same major/minor version
------------------------------------------------------------- -------------------------------------------------------------
>>> import sys >>> import sys
>>> print(system(buildout)) >>> print(system(buildout, env={'PYTHONWARNINGS':'ignore'}))
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
<BLANKLINE> <BLANKLINE>
>>> write(sample_buildout, 'buildout.cfg', >>> write(sample_buildout, 'buildout.cfg',
...@@ -22,7 +22,7 @@ Develop: '/sample-buildout/recipes' ...@@ -22,7 +22,7 @@ Develop: '/sample-buildout/recipes'
... recipe = recipes:pyshow ... recipe = recipes:pyshow
... """ % dict(syspython=sys.executable)) ... """ % dict(syspython=sys.executable))
>>> print(system(buildout)) >>> print(system(buildout, env={'PYTHONWARNINGS':'ignore'}))
slapos.rebootstrap: Make sure that the section 'installpython' won't be reinstalled after rebootstrap. slapos.rebootstrap: Make sure that the section 'installpython' won't be reinstalled after rebootstrap.
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
Installing installpython. Installing installpython.
...@@ -42,7 +42,7 @@ Installing realrun. ...@@ -42,7 +42,7 @@ Installing realrun.
Running with: /sample_buildout/parts/installpython/bin/python Running with: /sample_buildout/parts/installpython/bin/python
<BLANKLINE> <BLANKLINE>
>>> print(system(buildout)) >>> print(system(buildout, env={'PYTHONWARNINGS':'ignore'}))
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
Updating installpython. Updating installpython.
Updating realrun. Updating realrun.
...@@ -50,7 +50,7 @@ Running with: /sample_buildout/parts/installpython/bin/python ...@@ -50,7 +50,7 @@ Running with: /sample_buildout/parts/installpython/bin/python
<BLANKLINE> <BLANKLINE>
>>> cp(buildout + '-orig', buildout) >>> cp(buildout + '-orig', buildout)
>>> print(system(buildout)) >>> print(system(buildout, env={'PYTHONWARNINGS':'ignore'}))
slapos.rebootstrap: Make sure that the section 'installpython' won't be reinstalled after rebootstrap. slapos.rebootstrap: Make sure that the section 'installpython' won't be reinstalled after rebootstrap.
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
Updating installpython. Updating installpython.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
An edge case is when the python is provided by a part that does not need to install anything. An edge case is when the python is provided by a part that does not need to install anything.
>>> import sys >>> import sys
>>> print(system(buildout)) >>> print(system(buildout, env={'PYTHONWARNINGS':'ignore'}))
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
<BLANKLINE> <BLANKLINE>
>>> write(sample_buildout, 'buildout.cfg', >>> write(sample_buildout, 'buildout.cfg',
...@@ -23,7 +23,7 @@ Develop: '/sample-buildout/recipes' ...@@ -23,7 +23,7 @@ Develop: '/sample-buildout/recipes'
... recipe = recipes:pyshow ... recipe = recipes:pyshow
... """ % dict(syspython=sys.executable)) ... """ % dict(syspython=sys.executable))
>>> print(system(buildout)) >>> print(system(buildout, env={'PYTHONWARNINGS':'ignore'}))
Using already installed /system_python Using already installed /system_python
Develop: '/sample-buildout/recipes' Develop: '/sample-buildout/recipes'
Installing already_installed_python. Installing already_installed_python.
......
...@@ -35,6 +35,11 @@ setup( ...@@ -35,6 +35,11 @@ setup(
'pyalreadyinstalled = pyalreadyinstalled:PyAlreadyInstalled', 'pyalreadyinstalled = pyalreadyinstalled:PyAlreadyInstalled',
'pyshow = pyshow:Pyshow', 'pyshow = pyshow:Pyshow',
]}, ]},
py_modules = [
'pyinstall',
'pyalreadyinstalled',
'pyshow',
]
) )
""") """)
write(sample_buildout, 'recipes', 'README.txt', " ") write(sample_buildout, 'recipes', 'README.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