[Python-modules-commits] r30261 - in packages/python-gflags/trunk/debian (4 files)

piotr at users.alioth.debian.org piotr at users.alioth.debian.org
Tue Aug 26 23:51:02 UTC 2014


    Date: Tuesday, August 26, 2014 @ 23:51:01
  Author: piotr
Revision: 30261

python2.7-testsuite.patch updated to latest upstream revision

Added:
  packages/python-gflags/trunk/debian/patches/
  packages/python-gflags/trunk/debian/patches/python2.7-testsuite.patch
  packages/python-gflags/trunk/debian/patches/series
Modified:
  packages/python-gflags/trunk/debian/changelog

Modified: packages/python-gflags/trunk/debian/changelog
===================================================================
--- packages/python-gflags/trunk/debian/changelog	2014-08-26 22:04:08 UTC (rev 30260)
+++ packages/python-gflags/trunk/debian/changelog	2014-08-26 23:51:01 UTC (rev 30261)
@@ -7,7 +7,7 @@
 
   [ Piotr Ożarowski ]
   * New upstream release
-    - python2.7-testsuite.patch no longer needed (fixed upstream)
+    - python2.7-testsuite.patch updated to latest upstream revision
   * Update debian/rules to use files from new tests directory
   * Hardcode python_distutils buildsystem as upstream added Makefile
     (which doesn't have anything useful for us) and dh uses that instead of

Added: packages/python-gflags/trunk/debian/patches/python2.7-testsuite.patch
===================================================================
--- packages/python-gflags/trunk/debian/patches/python2.7-testsuite.patch	                        (rev 0)
+++ packages/python-gflags/trunk/debian/patches/python2.7-testsuite.patch	2014-08-26 23:51:01 UTC (rev 30261)
@@ -0,0 +1,55 @@
+Index: python-gflags-2.0/tests/gflags_googletest.py
+===================================================================
+--- python-gflags-2.0.orig/tests/gflags_googletest.py
++++ python-gflags-2.0/tests/gflags_googletest.py
+@@ -88,22 +88,22 @@ def MultiLineEqual(expected, actual):
+ 
+ 
+ class TestCase(unittest.TestCase):
+-  def assertListEqual(self, list1, list2):
++  def assertListEqual(self, list1, list2, msg=None):
+     """Asserts that, when sorted, list1 and list2 are identical."""
+     # This exists in python 2.7, but not previous versions.  Use the
+     # built-in version if possible.
+     if hasattr(unittest.TestCase, "assertListEqual"):
+-      unittest.TestCase.assertListEqual(self, Sorted(list1), Sorted(list2))
++      unittest.TestCase.assertListEqual(self, Sorted(list1), Sorted(list2), msg)
+     else:
+-      self.assertEqual(Sorted(list1), Sorted(list2))
++      self.assertEqual(Sorted(list1), Sorted(list2), msg)
+ 
+-  def assertMultiLineEqual(self, expected, actual):
++  def assertMultiLineEqual(self, expected, actual, msg=None):
+     # This exists in python 2.7, but not previous versions.  Use the
+     # built-in version if possible.
+     if hasattr(unittest.TestCase, "assertMultiLineEqual"):
+-      unittest.TestCase.assertMultiLineEqual(self, expected, actual)
++      unittest.TestCase.assertMultiLineEqual(self, expected, actual, msg)
+     else:
+-      self.assertTrue(MultiLineEqual(expected, actual))
++      self.assertTrue(MultiLineEqual(expected, actual), msg)
+ 
+   def assertRaisesWithRegexpMatch(self, exception, regexp, fn, *args, **kwargs):
+     try:
+Index: python-gflags-2.0/tests/gflags_unittest.py
+===================================================================
+--- python-gflags-2.0.orig/tests/gflags_unittest.py
++++ python-gflags-2.0/tests/gflags_unittest.py
+@@ -814,7 +814,7 @@ class MultiNumericalFlagsTest(googletest
+ 
+     self.assertRaisesWithRegexpMatch(
+         gflags.IllegalFlagValue,
+-        'flag --m_float2=abc: invalid literal for float\(\): abc',
++        'flag --m_float2=abc: (invalid literal for float\(\)||could not convert string to float): abc',
+         gflags.DEFINE_multi_float, 'm_float2', ['abc'], 'desc')
+ 
+     # Test non-parseable command line values.
+@@ -831,7 +831,7 @@ class MultiNumericalFlagsTest(googletest
+     argv = ('./program', '--m_float2=def')
+     self.assertRaisesWithRegexpMatch(
+         gflags.IllegalFlagValue,
+-        'flag --m_float2=def: invalid literal for float\(\): def',
++        'flag --m_float2=def: (invalid literal for float\(\)||could not convert string to float): def',
+         FLAGS, argv)
+ 
+ 

Added: packages/python-gflags/trunk/debian/patches/series
===================================================================
--- packages/python-gflags/trunk/debian/patches/series	                        (rev 0)
+++ packages/python-gflags/trunk/debian/patches/series	2014-08-26 23:51:01 UTC (rev 30261)
@@ -0,0 +1 @@
+python2.7-testsuite.patch




More information about the Python-modules-commits mailing list