subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From troycurti...@apache.org
Subject svn commit: r1814455 - /subversion/branches/swig-py3/subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
Date Tue, 07 Nov 2017 04:01:25 GMT
Author: troycurtisjr
Date: Tue Nov  7 04:01:25 2017
New Revision: 1814455

URL: http://svn.apache.org/viewvc?rev=1814455&view=rev
Log:
* subversion/bindings/swig/python/tests/trac/versioncontrol/tests/svn_fs.py
  Remove redundent StringIO imports.
  (test_diff_file_different_revs, test_diff_file_different_files,
   test_diff_file_no_change, test_diff_dir_different_revs,
   test_diff_dir_different_dirs, test_diff_dir_no_change,
   test_changeset_repos_creation): Remove extraneous '*args' lambda argument.

Modified:
    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/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=1814455&r1=1814454&r2=1814455&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
Tue Nov  7 04:01:25 2017
@@ -53,18 +53,13 @@ import shutil
 import sys
 import tempfile
 import unittest
+from io import StringIO
 
 if sys.version_info[0] >= 3:
   # Python >=3.0
-  from io import StringIO
   from urllib.request import pathname2url
 else:
   # Python <3.0
-  try:
-    from io import StringIO
-  except ImportError:
-    from io import StringIO
-
   from urllib import pathname2url
 
 from svn import core, repos
@@ -250,7 +245,7 @@ class SubversionRepositoryTestCase(unitt
         self._cmp_diff((('trunk/README.txt', 2),
                         ('trunk/README.txt', 3),
                         (Node.FILE, Changeset.EDIT)), next(diffs))
-        self.assertRaises(StopIteration, lambda *args: next(diffs))
+        self.assertRaises(StopIteration, lambda: next(diffs))
 
     def test_diff_file_different_files(self):
         diffs = self.repos.get_deltas('branches/v1x/README.txt', 12,
@@ -258,12 +253,12 @@ class SubversionRepositoryTestCase(unitt
         self._cmp_diff((('branches/v1x/README.txt', 12),
                         ('branches/v1x/README2.txt', 12),
                         (Node.FILE, Changeset.EDIT)), next(diffs))
-        self.assertRaises(StopIteration, lambda *args: next(diffs))
+        self.assertRaises(StopIteration, lambda: next(diffs))
 
     def test_diff_file_no_change(self):
         diffs = self.repos.get_deltas('trunk/README.txt', 7,
                                       'tags/v1/README.txt', 7)
-        self.assertRaises(StopIteration, lambda *args: next(diffs))
+        self.assertRaises(StopIteration, lambda: next(diffs))
 
     def test_diff_dir_different_revs(self):
         diffs = self.repos.get_deltas('trunk', 4, 'trunk', 8)
@@ -286,7 +281,7 @@ class SubversionRepositoryTestCase(unitt
         self.assertEqual(len(expected), len(actual))
         for e,a in zip(expected, actual):
           self._cmp_diff(e,a)
-        self.assertRaises(StopIteration, lambda *args: next(diffs))
+        self.assertRaises(StopIteration, lambda: next(diffs))
 
     def test_diff_dir_different_dirs(self):
         diffs = self.repos.get_deltas('trunk', 1, 'branches/v1x', 12)
@@ -311,12 +306,12 @@ class SubversionRepositoryTestCase(unitt
         self.assertEqual(len(expected), len(actual))
         for e,a in zip(expected, actual):
           self._cmp_diff(e,a)
-        self.assertRaises(StopIteration, lambda *args: next(diffs))
+        self.assertRaises(StopIteration, lambda: next(diffs))
 
     def test_diff_dir_no_change(self):
         diffs = self.repos.get_deltas('trunk', 7,
                                       'tags/v1', 7)
-        self.assertRaises(StopIteration, lambda *args: next(diffs))
+        self.assertRaises(StopIteration, lambda: next(diffs))
 
     # Changesets
 
@@ -326,7 +321,7 @@ class SubversionRepositoryTestCase(unitt
         self.assertEqual(None, chgset.message)
         self.assertEqual(None, chgset.author)
         self.assertEqual(1112349461, chgset.date)
-        self.assertRaises(StopIteration, lambda *args: next(chgset.get_changes()))
+        self.assertRaises(StopIteration, lambda: next(chgset.get_changes()))
 
     def test_changeset_added_dirs(self):
         chgset = self.repos.get_changeset(1)



Mime
View raw message