1
"""patch the perf tests for Python 2.5.
3
This just replaces the handful of b'msg' instances with 'msg'.
5
#-----------------------------------------------------------------------------
6
# Copyright (c) 2011-2012 Brian Granger, Min Ragan-Kelley
8
# This file is part of pyzmq
10
# Distributed under the terms of the New BSD License. The full license is in
11
# the file COPYING.BSD, distributed as part of this software.
12
#-----------------------------------------------------------------------------
14
for prefix in ('local', 'remote'):
15
for test in ('lat', 'thr'):
16
fname = '%s_%s.py'%(prefix, test)
17
print "patching %s for Python2.5"%fname
18
with open(fname) as f:
20
fixed = text.replace("b'", "'").replace('b"', '"')
24
with open('%s_%s.py'%(prefix, test), 'w') as f:
b'\\ No newline at end of file'