##// END OF EJS Templates
py3: use pycompat.bytestr in test-journal.t...
Pulkit Goyal -
r37382:1d26f745 default
parent child Browse files
Show More
@@ -3,7 +3,7 b' Tests for the journal extension; records'
3 $ cat >> testmocks.py << EOF
3 $ cat >> testmocks.py << EOF
4 > # mock out procutil.getuser() and util.makedate() to supply testable values
4 > # mock out procutil.getuser() and util.makedate() to supply testable values
5 > import os
5 > import os
6 > from mercurial import util
6 > from mercurial import util, pycompat
7 > from mercurial.utils import dateutil, procutil
7 > from mercurial.utils import dateutil, procutil
8 > def mockgetuser():
8 > def mockgetuser():
9 > return 'foobar'
9 > return 'foobar'
@@ -16,7 +16,7 b' Tests for the journal extension; records'
16 > except IOError:
16 > except IOError:
17 > time = 0.0
17 > time = 0.0
18 > with open(filename, 'wb') as timef:
18 > with open(filename, 'wb') as timef:
19 > timef.write(str(time))
19 > timef.write(pycompat.bytestr(time))
20 > return (time, 0)
20 > return (time, 0)
21 >
21 >
22 > procutil.getuser = mockgetuser
22 > procutil.getuser = mockgetuser
General Comments 0
You need to be logged in to leave comments. Login now