Commit 2f1d705a authored by Marius Gedminas's avatar Marius Gedminas Committed by Julien Muchembled

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.

(cherry picked from commit 2cf42066)
parent 20adbdb6
......@@ -524,6 +524,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.
......
......@@ -3689,6 +3689,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