subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From troycurti...@apache.org
Subject svn commit: r1819562 - in /subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/versioncontrol: svn_fs.py tests/svn_fs.py
Date Sat, 30 Dec 2017 02:32:58 GMT
Author: troycurtisjr
Date: Sat Dec 30 02:32:58 2017
New Revision: 1819562

URL: http://svn.apache.org/viewvc?rev=1819562&view=rev
Log:
On branch swig-py3: Fix swig tests which relied on consistent dict key ordering.

* subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py
  (test_changeset_file_edit, test_changeset_file_copy): Ensure consistent dict
   key sequence ordering by using sorted().

* subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
  (get_changes): Ensure moves indexes are sorted so that deletions work correctly.

Found By: danielsh

Modified:
    subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py
    subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py

Modified: subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py?rev=1819562&r1=1819561&r2=1819562&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py
(original)
+++ subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/versioncontrol/svn_fs.py
Sat Dec 30 02:32:58 2017
@@ -429,7 +429,7 @@ class SubversionChangeset(Changeset):
                 changes[v][2] = Changeset.MOVE
                 moves.append(deletions[k])
         offset = 0
-        for i in moves:
+        for i in sorted(moves):
             del changes[i - offset]
             offset += 1
 

Modified: subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
URL: http://svn.apache.org/viewvc/subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py?rev=1819562&r1=1819561&r2=1819562&view=diff
==============================================================================
--- subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
(original)
+++ subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
Sat Dec 30 02:32:58 2017
@@ -343,9 +343,9 @@ class SubversionRepositoryTestCase(unitt
         self.assertEqual(1112361898, chgset.date)
 
         changes = chgset.get_changes()
-        self.assertSequenceEqual([x for x in changes],
-                                 [('trunk/README.txt', Node.FILE, Changeset.EDIT,
-                                   'trunk/README.txt', 2)])
+        self.assertSequenceEqual(sorted([x for x in changes]),
+                                 sorted([('trunk/README.txt', Node.FILE, Changeset.EDIT,
+                                   'trunk/README.txt', 2)]))
 
     def test_changeset_dir_moves(self):
         chgset = self.repos.get_changeset(5)
@@ -368,9 +368,9 @@ class SubversionRepositoryTestCase(unitt
         self.assertEqual(1112381806, chgset.date)
 
         changes = chgset.get_changes()
-        self.assertSequenceEqual([x for x in changes],
-          [('trunk/README2.txt', Node.FILE, Changeset.COPY,
-            'trunk/README.txt', 3)])
+        self.assertSequenceEqual(sorted([x for x in changes]),
+          sorted([('trunk/README2.txt', Node.FILE, Changeset.COPY,
+                   'trunk/README.txt', 3)]))
 
 
 def suite():



Mime
View raw message