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