comparison tests/common.py @ 157:6564544576b9

tests: write out bytes instead of strings to test files (issue4520)
author Brett Cannon <brett@python.org>
date Wed, 25 Mar 2015 20:23:41 -0400
parents 1b47146a4a2c
children 8341f2494b3f
comparison
equal deleted inserted replaced
156:6d273d0a51aa 157:6564544576b9
43 pass # if our setUp was overriden 43 pass # if our setUp was overriden
44 44
45 def append(self, path, *args): 45 def append(self, path, *args):
46 f = open(path, 'ab') 46 f = open(path, 'ab')
47 for a in args: 47 for a in args:
48 f.write(str(a)) 48 f.write(a.encode('latin-1'))
49 f.close() 49 f.close()