Mercurial > hg
comparison tests/test-journal.t @ 37383:cb70be32f5f7
py3: convert user value to bytes by b'' prefix
This makes test-journal* pass on Python 3.5.
# skip-blame beacuse just b'' prefix
Differential Revision: https://phab.mercurial-scm.org/D3125
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 05 Apr 2018 16:47:44 +0530 |
parents | 1d26f745a10b |
children | 31750413f8d7 |
comparison
equal
deleted
inserted
replaced
37382:de9f9f888900 | 37383:cb70be32f5f7 |
---|---|
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, pycompat | 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 b'foobar' |
10 > | 10 > |
11 > def mockmakedate(): | 11 > def mockmakedate(): |
12 > filename = os.path.join(os.environ['TESTTMP'], 'testtime') | 12 > filename = os.path.join(os.environ['TESTTMP'], 'testtime') |
13 > try: | 13 > try: |
14 > with open(filename, 'rb') as timef: | 14 > with open(filename, 'rb') as timef: |