[Checkins] SVN: zc.buildout/trunk/src/zc/buildout/test Windows
tweaks
Jim Fulton
jim at zope.com
Tue Sep 19 16:29:58 EDT 2006
Log message for revision 70244:
Windows tweaks
Changed:
U zc.buildout/trunk/src/zc/buildout/testing.py
U zc.buildout/trunk/src/zc/buildout/tests.py
-=-
Modified: zc.buildout/trunk/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/testing.py 2006-09-19 20:29:07 UTC (rev 70243)
+++ zc.buildout/trunk/src/zc/buildout/testing.py 2006-09-19 20:29:57 UTC (rev 70244)
@@ -255,7 +255,7 @@
self.send_header('Content-Length', str(len(out)))
self.send_header('Content-Type', 'text/html')
else:
- out = open(path).read()
+ out = open(path, 'rb').read()
self.send_header('Content-Length', len(out))
if path.endswith('.egg'):
self.send_header('Content-Type', 'application/zip')
@@ -362,11 +362,17 @@
).write(dist.location)
def _normalize_path(match):
- return '/'+match.group(1).replace(os.path.sep, '/')
+ path = match.group(1)
+ if os.path.sep == '\\':
+ path = path.replace('\\\\', '/')
+ if path.startswith('\\'):
+ path = path[1:]
+ return '/' + path.replace(os.path.sep, '/')
normalize_path = (
- re.compile(r'''[^'" \t\n\r]+%(sep)s_TEST_%(sep)s([^"' \t\n\r]+)'''
- % dict(sep=os.path.sep)),
+ re.compile(
+ r'''[^'" \t\n\r]+\%(sep)s_[Tt][Ee][Ss][Tt]_\%(sep)s([^"' \t\n\r]+)'''
+ % dict(sep=os.path.sep)),
_normalize_path,
)
Modified: zc.buildout/trunk/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/tests.py 2006-09-19 20:29:07 UTC (rev 70243)
+++ zc.buildout/trunk/src/zc/buildout/tests.py 2006-09-19 20:29:57 UTC (rev 70244)
@@ -570,6 +570,7 @@
(re.compile('zc.buildout(-\S+)?[.]egg(-link)?'),
'zc.buildout.egg'),
(re.compile('creating \S*setup.cfg'), 'creating setup.cfg'),
+ (re.compile('hello\%ssetup' % os.path.sep), 'hello/setup'),
])
),
More information about the Checkins
mailing list