Commit 1e8e02f2 authored by Gary Poster's avatar Gary Poster

hide additional messages from distribute in tests so tests pass with it.

parent 77a3db7d
This diff is collapsed.
...@@ -416,24 +416,25 @@ def test_suite(): ...@@ -416,24 +416,25 @@ def test_suite():
'README.txt', 'README.txt',
setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown, setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
checker=renormalizing.RENormalizing([ checker=renormalizing.RENormalizing([
zc.buildout.testing.normalize_path, zc.buildout.testing.normalize_path,
zc.buildout.testing.normalize_endings, zc.buildout.testing.normalize_endings,
zc.buildout.testing.normalize_script, zc.buildout.testing.normalize_script,
zc.buildout.testing.normalize_egg_py, zc.buildout.testing.normalize_egg_py,
zc.buildout.tests.normalize_bang, zc.buildout.tests.normalize_bang,
(re.compile(r'zc.buildout(-\S+)?[.]egg(-link)?'), zc.buildout.tests.hide_distribute_additions,
'zc.buildout.egg'), (re.compile(r'zc.buildout(-\S+)?[.]egg(-link)?'),
(re.compile('[-d] (setuptools|distribute)-[^-]+-'), 'setuptools-X-'), 'zc.buildout.egg'),
(re.compile(r'(setuptools|distribute)-[\w.]+-py'), 'setuptools-X-py'), (re.compile('[-d] (setuptools|distribute)-[^-]+-'), 'setuptools-X-'),
(re.compile(r'eggs\\\\demo'), 'eggs/demo'), (re.compile(r'(setuptools|distribute)-[\w.]+-py'), 'setuptools-X-py'),
(re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'), (re.compile(r'eggs\\\\demo'), 'eggs/demo'),
(re.compile(r'\#!\S+\bpython\S*'), '#!/usr/bin/python'), (re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'),
# Normalize generate_script's Windows interpreter to UNIX: (re.compile(r'\#!\S+\bpython\S*'), '#!/usr/bin/python'),
(re.compile(r'\nimport subprocess\n'), '\n'), # Normalize generate_script's Windows interpreter to UNIX:
(re.compile('subprocess\\.call\\(argv, env=environ\\)'), (re.compile(r'\nimport subprocess\n'), '\n'),
'os.execve(sys.executable, argv, environ)'), (re.compile('subprocess\\.call\\(argv, env=environ\\)'),
(re.compile('distribute'), 'setuptools'), 'os.execve(sys.executable, argv, environ)'),
]) (re.compile('distribute'), 'setuptools'),
])
), ),
doctest.DocTestSuite( doctest.DocTestSuite(
setUp=setUp, setUp=setUp,
...@@ -442,6 +443,7 @@ def test_suite(): ...@@ -442,6 +443,7 @@ def test_suite():
zc.buildout.testing.normalize_path, zc.buildout.testing.normalize_path,
zc.buildout.testing.normalize_endings, zc.buildout.testing.normalize_endings,
zc.buildout.testing.normalize_egg_py, zc.buildout.testing.normalize_egg_py,
zc.buildout.tests.hide_distribute_additions,
(re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'), (re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'),
]), ]),
), ),
......
...@@ -43,41 +43,43 @@ def test_suite(): ...@@ -43,41 +43,43 @@ def test_suite():
'README.txt', 'README.txt',
setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown, setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
checker=renormalizing.RENormalizing([ checker=renormalizing.RENormalizing([
zc.buildout.testing.normalize_path, zc.buildout.testing.normalize_path,
zc.buildout.testing.normalize_endings, zc.buildout.testing.normalize_endings,
zc.buildout.testing.normalize_script, zc.buildout.testing.normalize_script,
zc.buildout.testing.normalize_egg_py, zc.buildout.testing.normalize_egg_py,
zc.buildout.tests.normalize_bang, zc.buildout.tests.normalize_bang,
(re.compile('zc.buildout(-\S+)?[.]egg(-link)?'), zc.buildout.tests.hide_distribute_additions,
'zc.buildout.egg'), (re.compile('zc.buildout(-\S+)?[.]egg(-link)?'),
(re.compile('[-d] (setuptools|distribute)-[^-]+-'), 'zc.buildout.egg'),
'setuptools-X-'), (re.compile('[-d] (setuptools|distribute)-[^-]+-'),
(re.compile(r'eggs\\\\demo'), 'eggs/demo'), 'setuptools-X-'),
(re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'), (re.compile(r'eggs\\\\demo'), 'eggs/demo'),
# Distribute unzips eggs by default. (re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'),
(re.compile('\- demoneeded'), 'd demoneeded'), # Distribute unzips eggs by default.
]) (re.compile('\- demoneeded'), 'd demoneeded'),
])
), ),
doctest.DocFileSuite( doctest.DocFileSuite(
'api.txt', 'api.txt',
setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown, setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
checker=renormalizing.RENormalizing([ checker=renormalizing.RENormalizing([
zc.buildout.testing.normalize_path, zc.buildout.testing.normalize_path,
zc.buildout.testing.normalize_endings, zc.buildout.testing.normalize_endings,
(re.compile('__buildout_signature__ = ' zc.buildout.tests.hide_distribute_additions,
'sample-\S+\s+' (re.compile('__buildout_signature__ = '
'zc.recipe.egg-\S+\s+' 'sample-\S+\s+'
'(setuptools|distribute)-\S+\s+' 'zc.recipe.egg-\S+\s+'
'zc.buildout-\S+\s*' '(setuptools|distribute)-\S+\s+'
), 'zc.buildout-\S+\s*'
'__buildout_signature__ = sample- zc.recipe.egg-\n'), ),
(re.compile('executable = [\S ]+python\S*', re.I), '__buildout_signature__ = sample- zc.recipe.egg-\n'),
'executable = python'), (re.compile('executable = [\S ]+python\S*', re.I),
(re.compile('find-links = http://localhost:\d+/'), 'executable = python'),
'find-links = http://localhost:8080/'), (re.compile('find-links = http://localhost:\d+/'),
(re.compile('index = http://localhost:\d+/index'), 'find-links = http://localhost:8080/'),
'index = http://localhost:8080/index'), (re.compile('index = http://localhost:\d+/index'),
]) 'index = http://localhost:8080/index'),
])
), ),
doctest.DocFileSuite( doctest.DocFileSuite(
'custom.txt', 'custom.txt',
...@@ -85,6 +87,7 @@ def test_suite(): ...@@ -85,6 +87,7 @@ def test_suite():
checker=renormalizing.RENormalizing([ checker=renormalizing.RENormalizing([
zc.buildout.testing.normalize_path, zc.buildout.testing.normalize_path,
zc.buildout.testing.normalize_endings, zc.buildout.testing.normalize_endings,
zc.buildout.tests.hide_distribute_additions,
(re.compile("(d ((ext)?demo(needed)?|other)" (re.compile("(d ((ext)?demo(needed)?|other)"
"-\d[.]\d-py)\d[.]\d(-\S+)?[.]egg"), "-\d[.]\d-py)\d[.]\d(-\S+)?[.]egg"),
'\\1V.V.egg'), '\\1V.V.egg'),
...@@ -104,21 +107,22 @@ def test_suite(): ...@@ -104,21 +107,22 @@ def test_suite():
setUp=setUpSelecting, setUp=setUpSelecting,
tearDown=zc.buildout.testing.buildoutTearDown, tearDown=zc.buildout.testing.buildoutTearDown,
checker=renormalizing.RENormalizing([ checker=renormalizing.RENormalizing([
zc.buildout.testing.normalize_path, zc.buildout.testing.normalize_path,
zc.buildout.testing.normalize_endings, zc.buildout.testing.normalize_endings,
zc.buildout.testing.normalize_script, zc.buildout.testing.normalize_script,
(re.compile('Got (setuptools|distribute) \S+'), zc.buildout.tests.hide_distribute_additions,
'Got setuptools V'), (re.compile('Got (setuptools|distribute) \S+'),
(re.compile('([d-] )?(setuptools|distribute)-\S+-py'), 'Got setuptools V'),
'setuptools-V-py'), (re.compile('([d-] )?(setuptools|distribute)-\S+-py'),
(re.compile('-py2[.][0-35-9][.]'), 'py2.5.'), 'setuptools-V-py'),
(re.compile('zc.buildout-\S+[.]egg'), (re.compile('-py2[.][0-35-9][.]'), 'py2.5.'),
'zc.buildout.egg'), (re.compile('zc.buildout-\S+[.]egg'),
(re.compile('zc.buildout[.]egg-link'), 'zc.buildout.egg'),
'zc.buildout.egg'), (re.compile('zc.buildout[.]egg-link'),
# Distribute unzips eggs by default. 'zc.buildout.egg'),
(re.compile('\- demoneeded'), 'd demoneeded'), # Distribute unzips eggs by default.
]), (re.compile('\- demoneeded'), 'd demoneeded'),
]),
), ),
) )
......
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