summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2011-12-22 20:54:01 +0000
committerMike Gilbert <floppym@gentoo.org>2011-12-22 20:54:01 +0000
commitbd5154638043f43cf0fc797b16d6becb404b01ab (patch)
treefebc8ae00b531564214161fb5e4aa9915e4bc6a2 /dev-python/cssutils
parentVersion bump to fix a few more bugs. (diff)
downloadgentoo-2-bd5154638043f43cf0fc797b16d6becb404b01ab.tar.gz
gentoo-2-bd5154638043f43cf0fc797b16d6becb404b01ab.tar.bz2
gentoo-2-bd5154638043f43cf0fc797b16d6becb404b01ab.zip
Fix test failures. Patch by Ian Delaney. Bug 386807.
(Portage version: 2.2.0_alpha81/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/cssutils')
-rw-r--r--dev-python/cssutils/ChangeLog6
-rw-r--r--dev-python/cssutils/cssutils-0.9.7.ebuild9
-rw-r--r--dev-python/cssutils/files/cssutils-0.9.7-test.patch60
3 files changed, 70 insertions, 5 deletions
diff --git a/dev-python/cssutils/ChangeLog b/dev-python/cssutils/ChangeLog
index 5c8982eb8df6..15e34e691758 100644
--- a/dev-python/cssutils/ChangeLog
+++ b/dev-python/cssutils/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/cssutils
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/cssutils/ChangeLog,v 1.20 2011/12/11 21:48:58 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/cssutils/ChangeLog,v 1.21 2011/12/22 20:54:01 floppym Exp $
+
+ 22 Dec 2011; Mike Gilbert <floppym@gentoo.org>
+ +files/cssutils-0.9.7-test.patch, cssutils-0.9.7.ebuild:
+ Fix test failures. Patch by Ian Delaney. Bug 386807.
11 Dec 2011; Markus Meier <maekke@gentoo.org> cssutils-0.9.7.ebuild:
x86 stable, bug #386729
diff --git a/dev-python/cssutils/cssutils-0.9.7.ebuild b/dev-python/cssutils/cssutils-0.9.7.ebuild
index a756ca8c4523..9ad61cf0cd3d 100644
--- a/dev-python/cssutils/cssutils-0.9.7.ebuild
+++ b/dev-python/cssutils/cssutils-0.9.7.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/cssutils/cssutils-0.9.7.ebuild,v 1.6 2011/12/11 21:48:58 maekke Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/cssutils/cssutils-0.9.7.ebuild,v 1.7 2011/12/22 20:54:01 floppym Exp $
EAPI="3"
PYTHON_DEPEND="2"
@@ -8,7 +8,7 @@ SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.*"
DISTUTILS_SRC_TEST="nosetests"
-inherit distutils
+inherit distutils eutils
MY_P="${PN}-${PV/_alpha/a}"
@@ -26,8 +26,6 @@ DEPEND="${RDEPEND}
app-arch/unzip
test? ( dev-python/minimock )"
-RESTRICT="test"
-
S="${WORKDIR}/${MY_P}"
PYTHON_MODNAME="cssutils encutils"
@@ -39,6 +37,9 @@ src_prepare() {
if has_version dev-python/pyxml; then
sed -e "s/test_linecol/_&/" -i src/tests/test_errorhandler.py
fi
+
+ # Bug 386807.
+ epatch "${FILESDIR}/${P}-test.patch"
}
src_install() {
diff --git a/dev-python/cssutils/files/cssutils-0.9.7-test.patch b/dev-python/cssutils/files/cssutils-0.9.7-test.patch
new file mode 100644
index 000000000000..a93e44fa9c5a
--- /dev/null
+++ b/dev-python/cssutils/files/cssutils-0.9.7-test.patch
@@ -0,0 +1,60 @@
+Fix some test failures. Adapted from:
+https://bitbucket.org/cthedot/cssutils/changeset/c944fbd1b309
+diff -ur cssutils-0.9.7.orig/examples/customlog.py cssutils-0.9.7/examples/customlog.py
+--- examples/customlog.py 2010-11-27 18:23:40.000000000 +0800
++++ examples/customlog.py 2011-12-23 02:11:47.863908828 +0800
+@@ -1,7 +1,7 @@
+ import logging, StringIO
+
+ EXPOUT = ""
+-EXPERR = u"Property: Unknown Property name. [1:5: x]\nHTTPError opening url=u'http://example.com/x': 404 Not Found\nCSSImportRule: While processing imported style sheet href=u'http://example.com/x': IOError('Cannot read Stylesheet.',)\nCSSStylesheet: CSSImportRule not allowed here. [1:13: @import]\n"
++EXPERR = u"Property: Unknown Property name. [1:5: x]\nHTTPError opening url=u'http://cthedot.de/x': 404 Not Found\nCSSImportRule: While processing imported style sheet href=u'http://cthedot.de/x': IOError('Cannot read Stylesheet.',)\nCSSStylesheet: CSSImportRule not allowed here. [1:13: @import]\n"
+
+ def main():
+ import cssutils
+@@ -12,7 +12,7 @@
+ #cssutils.log.addHandler(h)
+ cssutils.log.setLevel(logging.INFO)
+
+- sheet = cssutils.parseString('a { x: 1; } @import "http://example.com/x";')
++ sheet = cssutils.parseString('a { x: 1; } @import "http://cthedot.de/x";')
+ #print mylog.getvalue()
+
+ cssutils.log.removeHandler(h)
+diff -ur cssutils-0.9.7.orig/src/tests/test_parse.py cssutils-0.9.7/src/tests/test_parse.py
+--- src/tests/test_parse.py 2010-11-27 18:23:36.000000000 +0800
++++ src/tests/test_parse.py 2011-12-23 02:24:13.419840476 +0800
+@@ -96,15 +96,15 @@
+ ('', None): (False, None, None),
+ ('1', None): (False, None, None),
+ ('mailto:a@bb.cd', None): (False, None, None),
+- ('http://example.com/x.css', None): (False, None, None),
+- ('http://example.com/x.css', ''): (True, u'utf-8', u''),
+- # ('http://example.com/x.css', 'a'): (True, u'utf-8', u''),
+-# ('http://example.com/x.css', 'a {color: red}'): (True, u'utf-8',
+-# u'a {\n color: red\n }'),
+-# ('http://example.com/x.css', 'a {color: red}'): (True, u'utf-8',
+-# u'a {\n color: red\n }'),
+-# ('http://example.com/x.css', '@charset "ascii";a {color: red}'): (True, u'ascii',
+-# u'@charset "ascii";\na {\n color: red\n }'),
++ ('http://cthedot.de/test.css', None): (False, None, None),
++ ('http://cthedot.de/test.css', ''): (True, u'utf-8', u''),
++ ('http://cthedot.de/test.css', 'a'): (True, u'utf-8', u''),
++ ('http://cthedot.de/test.css', 'a {color: red}'): (True, u'utf-8',
++ u'a {\n color: red\n }'),
++ ('http://cthedot.de/test.css', 'a {color: red}'): (True, u'utf-8',
++ u'a {\n color: red\n }'),
++ ('http://cthedot.de/test.css', '@charset "ascii";a {color: red}'): (True, u'ascii',
++ u'@charset "ascii";\na {\n color: red\n }'),
+ }
+ override = 'iso-8859-1'
+ overrideprefix = u'@charset "iso-8859-1";'
+@@ -132,7 +132,7 @@
+ self.assertEqual(sheet2, None)
+
+ self.assertRaises(ValueError, parser.parseUrl, '../not-valid-in-urllib')
+- self.assertRaises(urllib2.HTTPError, parser.parseUrl, 'http://example.com/not-present.css')
++ self.assertRaises(urllib2.HTTPError, parser.parseUrl, 'http://cthedot.de/not-present.css')
+
+ def test_parseString(self):
+ "CSSParser.parseString()"