Commit 2cf42066 authored by Marius Gedminas's avatar Marius Gedminas

Fix tests

Add a RENormalizer so the easy_install.txt will be happy with scripts
generated on Python 2 (using open(..., 'U')) and on Python 3 (using just
open(...)).

This was suggested by @sallner.
parent 978a6af9
......@@ -606,6 +606,9 @@ normalize_exception_type_for_python_2_and_3 = (
re.compile(r'^(\w+\.)*([A-Z][A-Za-z0-9]+Error: )'),
'\2')
normalize_open_in_generated_script = (
re.compile(r"open\(__file__, 'U'\)"), 'open(__file__)')
not_found = (re.compile(r'Not found: [^\n]+/(\w|\.)+/\r?\n'), '')
# Setuptools now pulls in dependencies when installed.
......
......@@ -3730,6 +3730,7 @@ def test_suite():
zc.buildout.testing.normalize_endings,
zc.buildout.testing.normalize_egg_py,
zc.buildout.testing.normalize_exception_type_for_python_2_and_3,
zc.buildout.testing.normalize_open_in_generated_script,
zc.buildout.testing.adding_find_link,
zc.buildout.testing.not_found,
normalize_bang,
......
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