Patchwork [10,of,10] tests: mark test-atomictempfile.py write as binary

login
register
mail settings
Submitter timeless
Date May 12, 2016, 1:23 a.m.
Message ID <8ec439633609e0855f55.1463016198@gcc2-power8.osuosl.org>
Download mbox | patch
Permalink /patch/15058/
State Accepted
Delegated to: Yuya Nishihara
Headers show

Comments

timeless - May 12, 2016, 1:23 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1461182159 0
#      Wed Apr 20 19:55:59 2016 +0000
# Node ID 8ec439633609e0855f5505fa4a6b22a457ea83fb
# Parent  0fb40274d36c42e8fe4eb70166fb5d85496a94f3
# Available At bb://timeless/mercurial-crew
#              hg pull bb://timeless/mercurial-crew -r 8ec439633609
tests: mark test-atomictempfile.py write as binary
Yuya Nishihara - May 18, 2016, 2:17 p.m.
On Thu, 12 May 2016 01:23:18 +0000, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1461182159 0
> #      Wed Apr 20 19:55:59 2016 +0000
> # Node ID 8ec439633609e0855f5505fa4a6b22a457ea83fb
> # Parent  0fb40274d36c42e8fe4eb70166fb5d85496a94f3
> # Available At bb://timeless/mercurial-crew
> #              hg pull bb://timeless/mercurial-crew -r 8ec439633609
> tests: mark test-atomictempfile.py write as binary

Pushed the last two to the committed repo, thanks.

Patch

diff -r 0fb40274d36c -r 8ec439633609 tests/test-atomictempfile.py
--- a/tests/test-atomictempfile.py	Wed Apr 20 19:53:01 2016 +0000
+++ b/tests/test-atomictempfile.py	Wed Apr 20 19:55:59 2016 +0000
@@ -14,7 +14,7 @@ 
         self.assertFalse(os.path.isfile('foo'))
         self.assertTrue(basename in glob.glob('.foo-*'))
 
-        file.write('argh\n')
+        file.write(b'argh\n')
         file.close()
 
         self.assertTrue(os.path.isfile('foo'))
@@ -27,7 +27,7 @@ 
         file = atomictempfile('foo')
         (dir, basename) = os.path.split(file._tempname)
 
-        file.write('yo\n')
+        file.write(b'yo\n')
         file.discard()
 
         self.assertFalse(os.path.isfile('foo'))