##// END OF EJS Templates
tests: use bytes for file I/O...
Gregory Szorc -
r41353:abac73ee default
parent child Browse files
Show More
@@ -232,12 +232,12 b' class histpacktests(unittest.TestCase):'
232 232
233 233 def testBadVersionThrows(self):
234 234 pack = self.createPack()
235 path = pack.path + '.histpack'
236 with open(path) as f:
235 path = pack.path + b'.histpack'
236 with open(path, 'rb') as f:
237 237 raw = f.read()
238 238 raw = struct.pack('!B', 255) + raw[1:]
239 239 os.chmod(path, os.stat(path).st_mode | stat.S_IWRITE)
240 with open(path, 'w+') as f:
240 with open(path, 'wb+') as f:
241 241 f.write(raw)
242 242
243 243 try:
General Comments 0
You need to be logged in to leave comments. Login now