Patchwork D3124: py3: use pycompat.bytestr in test-journal.t

login
register
mail settings
Submitter phabricator
Date April 5, 2018, 12:31 p.m.
Message ID <differential-rev-PHID-DREV-x7i7t55rksqlhrq5alg2-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30351/
State Superseded
Headers show

Comments

phabricator - April 5, 2018, 12:31 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3124

AFFECTED FILES
  tests/test-journal.t

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-journal.t b/tests/test-journal.t
--- a/tests/test-journal.t
+++ b/tests/test-journal.t
@@ -3,7 +3,7 @@ 
   $ cat >> testmocks.py << EOF
   > # mock out procutil.getuser() and util.makedate() to supply testable values
   > import os
-  > from mercurial import util
+  > from mercurial import util, pycompat
   > from mercurial.utils import dateutil, procutil
   > def mockgetuser():
   >     return 'foobar'
@@ -16,7 +16,7 @@ 
   >     except IOError:
   >         time = 0.0
   >     with open(filename, 'wb') as timef:
-  >         timef.write(str(time))
+  >         timef.write(pycompat.bytestr(time))
   >     return (time, 0)
   > 
   > procutil.getuser = mockgetuser