Commit 58346265 authored by Godefroid Chapelle's avatar Godefroid Chapelle

Problem: some tests do not pass on Windows

Solution: fix them
parent b34b9bfd
......@@ -390,7 +390,7 @@ we'll get a user error, not a traceback::
>>> print_(system(buildout), end='')
Develop: '/sample-buildout/recipes'
data-dir: Cannot create /xxx/mydata. /xxx is not a directory.
data-dir: Cannot create .../xxx/mydata. .../xxx is not a directory.
While:
Installing.
Getting section data-dir.
......
......@@ -145,7 +145,10 @@ class TestEasyInstall(unittest.TestCase):
self.assertIsNotNone(result)
self.assertEqual(result.version, '3.3')
self.assertIn(dest, result.location)
if zc.buildout.WINDOWS:
self.assertIn(dest.lower(), result.location)
else:
self.assertIn(dest, result.location)
def develop_w_non_setuptools_setup_scripts():
......
......@@ -147,5 +147,5 @@ recipe instance:
demo 0.2
other 1.0
demoneeded 1.1
extra paths: ['/foo/bar', '/spam/eggs']
extra paths: ['.../foo/bar', '.../spam/eggs']
......@@ -20,6 +20,7 @@ import shutil
import sys
import zc.buildout.tests
import zc.buildout.testing
from zc.buildout import WINDOWS
import unittest
......@@ -37,7 +38,7 @@ def setUp(test):
zc.buildout.testing.install_develop('zc.recipe.egg', test)
def test_suite():
suite = unittest.TestSuite((
suites = [
doctest.DocFileSuite(
'README.rst',
setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
......@@ -83,21 +84,6 @@ def test_suite():
'index = http://localhost:8080/index'),
])
),
doctest.DocFileSuite(
'custom.rst',
setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
checker=renormalizing.RENormalizing([
zc.buildout.testing.normalize_path,
zc.buildout.testing.normalize_endings,
zc.buildout.testing.not_found,
zc.buildout.testing.python27_warning,
zc.buildout.testing.python27_warning_2,
(re.compile("(d ((ext)?demo(needed)?|other)"
r"-\d[.]\d-py)\d[.]\d(-\S+)?[.]egg"),
'\\1V.V.egg'),
]),
),
doctest.DocFileSuite(
'working_set_caching.rst',
setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
......@@ -108,7 +94,26 @@ def test_suite():
zc.buildout.testing.not_found,
])
),
))
]
if not WINDOWS:
suites.append(
doctest.DocFileSuite(
'custom.rst',
setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS,
checker=renormalizing.RENormalizing([
zc.buildout.testing.normalize_path,
zc.buildout.testing.normalize_endings,
zc.buildout.testing.not_found,
zc.buildout.testing.python27_warning,
zc.buildout.testing.python27_warning_2,
(re.compile("(d ((ext)?demo(needed)?|other)"
r"-\d[.]\d-py)\d[.]\d(-\S+)?[.]egg"),
'\\1V.V.egg'),
]),
)
)
suite = unittest.TestSuite(suites)
return suite
if __name__ == '__main__':
......
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