Code review comment for lp:~gary/zc.buildout/python-support-1-cleanup

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

> === modified file 'src/zc/buildout/testing.py'
> --- src/zc/buildout/testing.py 2009-11-06 22:33:23 +0000
> +++ src/zc/buildout/testing.py 2010-02-17 21:22:11 +0000
> @@ -492,10 +492,14 @@
> path = path[1:]
> return '/' + path.replace(os.path.sep, '/')
>
> +if sys.platform == 'win32':
> + sep = r'[\\/]' # Windows uses both sometimes.
> +else:
> + sep = re.escape(os.path.sep)
> normalize_path = (
> re.compile(
> - r'''[^'" \t\n\r]+\%(sep)s_[Tt][Ee][Ss][Tt]_\%(sep)s([^"' \t\n\r]+)'''
> - % dict(sep=os.path.sep)),
> + r'''[^'" \t\n\r]+%(sep)s_[Tt][Ee][Ss][Tt]_%(sep)s([^"' \t\n\r]+)'''
> + % dict(sep=sep)),
> _normalize_path,
> )

I don't understand why you removed the backslash from the normalize_path
regex. IS it that you want the backslash to be a separator only on windows?

Rest looks good.

review: Approve

« Back to merge proposal