Commit 29a13cbb authored by Reinout van Rees's avatar Reinout van Rees

Added if/else for windows to get winbot tests running again.

On windows, two files are generated (a something.exe and a
something-script.py). The if/else I used is used elsewhere in other tests,
too.
parent 21344c76
......@@ -2782,9 +2782,16 @@ def test_distutils_scripts_using_import_are_properly_parsed():
>>> sys.executable = 'python'
>>> from zc.buildout.easy_install import _distutils_script
>>> _distutils_script('\\'/path/test/\\'', 'bin/pyflint', pyflint_script, '', '')
['bin/pyflint']
>>> cat('bin/pyflint')
>>> generated = _distutils_script('\\'/path/test/\\'', 'bin/pyflint', pyflint_script, '', '')
>>> if sys.platform == 'win32':
... generated == ['bin/pyflint.exe', 'bin/pyflint-script.py']
... else:
... generated == ['bin/pyflint']
True
>>> if sys.platform == 'win32':
... cat('bin/pyflint-script.py')
... else:
... cat('bin/pyflint')
#!python
<BLANKLINE>
<BLANKLINE>
......@@ -2817,9 +2824,16 @@ def test_distutils_scripts_using_from_are_properly_parsed():
>>> sys.executable = 'python'
>>> from zc.buildout.easy_install import _distutils_script
>>> _distutils_script('\\'/path/test/\\'', 'bin/pyflint', pyflint_script, '', '')
['bin/pyflint']
>>> cat('bin/pyflint')
>>> generated = _distutils_script('\\'/path/test/\\'', 'bin/pyflint', pyflint_script, '', '')
>>> if sys.platform == 'win32':
... generated == ['bin/pyflint.exe', 'bin/pyflint-script.py']
... else:
... generated == ['bin/pyflint']
True
>>> if sys.platform == 'win32':
... cat('bin/pyflint-script.py')
... else:
... cat('bin/pyflint')
#!python
<BLANKLINE>
<BLANKLINE>
......
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