summaryrefslogtreecommitdiff
path: root/dev-python/cssutils/files
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-11-26 10:27:15 +0100
committerJustin Lecher <jlec@gentoo.org>2015-11-26 10:28:25 +0100
commitd924168b217c90faea5781e0c91fed0f5e797aab (patch)
tree38ae7714cde36cb65ff23ad26070b9159b291b49 /dev-python/cssutils/files
parent38b67633ef867927d87c0930850e7626190d050c (diff)
downloadgentoo-d924168b217c90faea5781e0c91fed0f5e797aab.tar.gz
gentoo-d924168b217c90faea5781e0c91fed0f5e797aab.tar.xz
dev-python/cssutils: Backport fix for test failures on pypy
Package-Manager: portage-2.2.25 Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'dev-python/cssutils/files')
-rw-r--r--dev-python/cssutils/files/cssutils-1.0.1-pypy-test-backport.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-python/cssutils/files/cssutils-1.0.1-pypy-test-backport.patch b/dev-python/cssutils/files/cssutils-1.0.1-pypy-test-backport.patch
new file mode 100644
index 00000000000..89c7608d324
--- /dev/null
+++ b/dev-python/cssutils/files/cssutils-1.0.1-pypy-test-backport.patch
@@ -0,0 +1,32 @@
+# HG changeset patch
+# User Daniel <kingdread@gmx.de>
+# Date 1448482419 -3600
+# Node ID 01a19d494b6f31e91c54ae39c5a6f43f6292a85d
+# Parent 3a01bd18118a6466ad93aa23caaa4164528b59ac
+Fix tests on PyPy 2
+
+Tests fail because of the extra "u" prefix in the error message
+
+diff --git a/src/cssutils/tests/test_profiles.py b/src/cssutils/tests/test_profiles.py
+--- a/src/cssutils/tests/test_profiles.py
++++ b/src/cssutils/tests/test_profiles.py
+@@ -2,6 +2,7 @@
+ __version__ = '$Id: test_cssvalue.py 1443 2008-08-31 13:54:39Z cthedot $'
+
+ import sys
++import platform
+ import basetest
+ import cssutils
+
+@@ -124,6 +125,11 @@
+ expmsg = u"invalid literal for int(): x"
+ elif sys.platform.startswith('java'):
+ expmsg = u"invalid literal for int() with base 10: x"
++ # PyPy adds the u prefix, but only in versions lower than Python 3
++ elif (platform.python_implementation() == "PyPy" and
++ sys.version_info < (3, 0)):
++ expmsg = u"invalid literal for int() with base 10: u'x'"
++
+
+ self.assertRaisesMsg(Exception, expmsg,
+ cssutils.profile.validate, u'-test-funcval', u'x')