test-run-tests.t: work around file.write() returning an int
authorAugie Fackler <augie@google.com>
Mon, 13 Apr 2015 16:37:53 -0400
changeset 25054 af5a778f8e2e
parent 25053 4f2c74ef8128
child 25055 d79258e30499
test-run-tests.t: work around file.write() returning an int In Python 3.5, file.write() returns the number of bytes it wrote instead of None.
tests/test-run-tests.t
--- a/tests/test-run-tests.t	Tue Apr 14 16:24:32 2015 -0400
+++ b/tests/test-run-tests.t	Mon Apr 13 16:37:53 2015 -0400
@@ -39,8 +39,8 @@
   > EOF
 
   >>> fh = open('test-failure-unicode.t', 'wb')
-  >>> fh.write(u'  $ echo babar\u03b1\n'.encode('utf-8'))
-  >>> fh.write(u'  l\u03b5\u03b5t\n'.encode('utf-8'))
+  >>> fh.write(u'  $ echo babar\u03b1\n'.encode('utf-8')) and None
+  >>> fh.write(u'  l\u03b5\u03b5t\n'.encode('utf-8')) and None
 
   $ $TESTDIR/run-tests.py --with-hg=`which hg`
   
@@ -258,8 +258,8 @@
 
 failures in parallel with --first should only print one failure
   >>> f = open('test-nothing.t', 'w')
-  >>> f.write('foo\n' * 1024)
-  >>> f.write('  $ sleep 1')
+  >>> f.write('foo\n' * 1024) and None
+  >>> f.write('  $ sleep 1') and None
   $ $TESTDIR/run-tests.py --with-hg=`which hg` --jobs 2 --first
   
   --- $TESTTMP/test-failure*.t (glob)