[Python-modules-commits] r30283 - in packages/configobj/trunk/debian/patches (3 files)
bdrung at users.alioth.debian.org
bdrung at users.alioth.debian.org
Wed Aug 27 15:12:16 UTC 2014
Date: Wednesday, August 27, 2014 @ 15:12:15
Author: bdrung
Revision: 30283
Drop report-doctest-failure.diff and py27-test.diff (fixed upstream).
Modified:
packages/configobj/trunk/debian/patches/series
Deleted:
packages/configobj/trunk/debian/patches/py27-test.diff
packages/configobj/trunk/debian/patches/report-doctest-failure.diff
Deleted: packages/configobj/trunk/debian/patches/py27-test.diff
===================================================================
--- packages/configobj/trunk/debian/patches/py27-test.diff 2014-08-27 15:10:30 UTC (rev 30282)
+++ packages/configobj/trunk/debian/patches/py27-test.diff 2014-08-27 15:12:15 UTC (rev 30283)
@@ -1,105 +0,0 @@
-Description: Fix tests on Python 2.7 by making as_* tests proper unit tests
-Author: Stefan Parviainen <pafcu at iki.fi>
-Origin: http://code.google.com/r/pafcu-configobj/source/detail?r=ccd79e87be5cee5b8a00df75ede01c66ad9308a5
-Last-Update: 2011-01-12
---- a/configobj.py
-+++ b/configobj.py
-@@ -1010,18 +1010,6 @@
-
- If the value is an invalid literal for ``float``, a ``ValueError`` will
- be raised.
--
-- >>> a = ConfigObj()
-- >>> a['a'] = 'fish'
-- >>> a.as_float('a')
-- Traceback (most recent call last):
-- ValueError: invalid literal for float(): fish
-- >>> a['b'] = '1'
-- >>> a.as_float('b')
-- 1.0
-- >>> a['b'] = '3.2'
-- >>> a.as_float('b')
-- 3.2000000000000002
- """
- return float(self[key])
-
---- a/tests/functionaltests/test_configobj.py
-+++ b/tests/functionaltests/test_configobj.py
-@@ -99,3 +99,23 @@
- # This raises a MissingInterpolationOption exception in 4.7.1 and earlier
- repr(c)
-
-+ def test_as_functions(self):
-+ a = ConfigObj()
-+ a['a'] = 'fish'
-+ self.assertRaises(ValueError, a.as_bool, 'a')
-+ a['b'] = 'True'
-+ self.assertEquals(a.as_bool('b'),True)
-+ a['b'] = 'off'
-+ self.assertEquals(a.as_bool('b'),False)
-+ a['a'] = 'fish'
-+ self.assertRaises(ValueError, a.as_int, 'a')
-+ a['b'] = '1'
-+ self.assertEquals(a.as_int('b'),1)
-+ a['b'] = '3.2'
-+ self.assertRaises(ValueError,a.as_int,'b')
-+ a['a'] = 'fish'
-+ self.assertRaises(ValueError,a.as_float, 'a')
-+ a['b'] = '1'
-+ self.assertEqual(a.as_float('b'),1.0)
-+ a['b'] = '3.2'
-+ self.assertEqual(a.as_float('b'),3.2)
---- a/tests/test_configobj.py
-+++ b/tests/test_configobj.py
-@@ -576,50 +576,7 @@
- >>> c = ConfigObj(a, unrepr=True)
- >>> type(c['k']) == dict
- 1
--
-- >>> a = ConfigObj()
-- >>> a['a'] = 'fish'
-- >>> a.as_bool('a')
-- Traceback (most recent call last):
-- ValueError: Value "fish" is neither True nor False
-- >>> a['b'] = 'True'
-- >>> a.as_bool('b')
-- 1
-- >>> a['b'] = 'off'
-- >>> a.as_bool('b')
-- 0
--
-- >>> a = ConfigObj()
-- >>> a['a'] = 'fish'
-- >>> try:
-- ... a.as_int('a') #doctest: +ELLIPSIS
-- ... except ValueError, e:
-- ... err_mess = str(e)
-- >>> err_mess.startswith('invalid literal for int()')
-- 1
-- >>> a['b'] = '1'
-- >>> a.as_int('b')
-- 1
-- >>> a['b'] = '3.2'
-- >>> try:
-- ... a.as_int('b') #doctest: +ELLIPSIS
-- ... except ValueError, e:
-- ... err_mess = str(e)
-- >>> err_mess.startswith('invalid literal for int()')
-- 1
--
-- >>> a = ConfigObj()
-- >>> a['a'] = 'fish'
-- >>> a.as_float('a')
-- Traceback (most recent call last):
-- ValueError: invalid literal for float(): fish
-- >>> a['b'] = '1'
-- >>> a.as_float('b')
-- 1.0
-- >>> a['b'] = '3.2'
-- >>> a.as_float('b')
-- 3.2000000000000002
--
-+
- Test # with unrepr
- >>> a = '''
- ... key1 = (1, 2, 3) # comment
Deleted: packages/configobj/trunk/debian/patches/report-doctest-failure.diff
===================================================================
--- packages/configobj/trunk/debian/patches/report-doctest-failure.diff 2014-08-27 15:10:30 UTC (rev 30282)
+++ packages/configobj/trunk/debian/patches/report-doctest-failure.diff 2014-08-27 15:12:15 UTC (rev 30283)
@@ -1,20 +0,0 @@
-Description: Return failure if doctests fail
-Author: Stefano Rivera <stefanor at debian.org>
-Forwarded: http://code.google.com/p/configobj/issues/detail?id=30
-Last-Update: 2011-02-05
---- a/tests/test_configobj.py
-+++ b/tests/test_configobj.py
-@@ -2215,7 +2215,10 @@
- doctest.testmod(m, globs=globs)
-
- import configobj
-- doctest.testmod(configobj, globs=globs)
-+ failures, tests = doctest.testmod(configobj, globs=globs)
-+ print "Ran %i tests. Failures: %i" % (tests, failures)
-+ if failures:
-+ sys.exit(1)
-
-
--# Man alive I prefer unittest ;-)
-\ No newline at end of file
-+# Man alive I prefer unittest ;-)
Modified: packages/configobj/trunk/debian/patches/series
===================================================================
--- packages/configobj/trunk/debian/patches/series 2014-08-27 15:10:30 UTC (rev 30282)
+++ packages/configobj/trunk/debian/patches/series 2014-08-27 15:12:15 UTC (rev 30283)
@@ -1,4 +1,2 @@
eggify.diff
-report-doctest-failure.diff
-py27-test.diff
triplequotes.diff
More information about the Python-modules-commits
mailing list