subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1743244 - /subversion/trunk/subversion/tests/cmdline/trans_tests.py
Date Tue, 10 May 2016 18:06:23 GMT
Author: stefan2
Date: Tue May 10 18:06:23 2016
New Revision: 1743244

URL: http://svn.apache.org/viewvc?rev=1743244&view=rev
Log:
Get trans tests to work with Python 3.

* subversion/tests/cmdline/trans_tests.py
  (eol_change_is_text_mod): Binary files require us to write byte strings
                            to them.

Modified:
    subversion/trunk/subversion/tests/cmdline/trans_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/trans_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/trans_tests.py?rev=1743244&r1=1743243&r2=1743244&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/trans_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/trans_tests.py Tue May 10 18:06:23 2016
@@ -562,9 +562,9 @@ def eol_change_is_text_mod(sbox):
   foo_path = os.path.join(wc_dir, 'foo')
   f = open(foo_path, 'wb')
   if svntest.main.windows:
-    f.write("1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\n")
+    f.write(b"1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\n")
   else:
-    f.write("1\n2\n3\n4\n5\n6\n7\n8\n9\n")
+    f.write(b"1\n2\n3\n4\n5\n6\n7\n8\n9\n")
   f.close()
 
   # commit the file
@@ -591,10 +591,10 @@ def eol_change_is_text_mod(sbox):
   # check 2: do the files have the right contents now?
   contents = open(foo_path, 'rb').read()
   if svntest.main.windows:
-    if contents != "1\n2\n3\n4\n5\n6\n7\n8\n9\n":
+    if contents != b"1\n2\n3\n4\n5\n6\n7\n8\n9\n":
       raise svntest.Failure
   else:
-    if contents != "1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\n":
+    if contents != b"1\r\n2\r\n3\r\n4\r\n5\r\n6\r\n7\r\n8\r\n9\r\n":
       raise svntest.Failure
 
   foo_base_path = svntest.wc.text_base_path(foo_path)



Mime
View raw message