Skip to content

Commit

Permalink
normalize name of python executable
Browse files Browse the repository at this point in the history
  • Loading branch information
janwijbrand committed Oct 26, 2010
1 parent a3e6c52 commit dd27426
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/z3c/recipe/compattest/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
re.compile('(\n?)- ([a-zA-Z0-9_.-]+)-script.py\n- \\2.exe\n'),
'\\1- \\2\n')

# Distribute does not result in a setuptools compattest binary, so filter that
# out.
# Distribute does not result in a setuptools compattest binary, so filter
# that out.
normalize_setuptools = (
re.compile('- compattest-setuptools'),
'')

# On windows and OS X the name of the python executable starts with a
# capital 'P'. On linux it does not.
python_case_normalizer = (re.compile('[pP]ython'), 'python')

def DocFileSuite(*args, **kw):
def setUp(test):
Expand Down Expand Up @@ -42,6 +45,7 @@ def tearDown(test):
zc.buildout.testing.normalize_path,
normalize_script,
normalize_setuptools,
python_case_normalizer,
])

return doctest.DocFileSuite(*args, **kw)
3 changes: 2 additions & 1 deletion src/z3c/recipe/compattest/tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import re
import z3c.recipe.compattest.testing

from zope.testing import renormalizing

def test_suite():
return z3c.recipe.compattest.testing.DocFileSuite(
Expand Down

0 comments on commit dd27426

Please sign in to comment.