py3: suppress write() result and close file in test-bookmarks-pushpull.t
authorYuya Nishihara <yuya@tcha.org>
Sun, 08 Jul 2018 19:11:54 +0900
changeset 38606 15622e72307d
parent 38605 85c74c5a1590
child 38607 fe81af15675a
py3: suppress write() result and close file in test-bookmarks-pushpull.t
contrib/python3-whitelist
tests/test-bookmarks-pushpull.t
--- a/contrib/python3-whitelist	Sun Jul 08 18:58:11 2018 +0900
+++ b/contrib/python3-whitelist	Sun Jul 08 19:11:54 2018 +0900
@@ -24,6 +24,7 @@
 test-blackbox.t
 test-bookmarks-current.t
 test-bookmarks-merge.t
+test-bookmarks-pushpull.t
 test-bookmarks-rebase.t
 test-bookmarks-strip.t
 test-bookmarks.t
--- a/tests/test-bookmarks-pushpull.t	Sun Jul 08 18:58:11 2018 +0900
+++ b/tests/test-bookmarks-pushpull.t	Sun Jul 08 19:11:54 2018 +0900
@@ -1034,7 +1034,8 @@
 ===============================================
 
 #if b2-binary
-  >>> open('longname', 'w').write('wat' * 100)
+  >>> with open('longname', 'w') as f:
+  ...     f.write('wat' * 100) and None
   $ hg book `cat longname`
   $ hg push -B `cat longname` ../unchanged-b
   pushing to ../unchanged-b