public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Justin Lecher" <jlec@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/cssutils/, dev-python/cssutils/files/
Date: Thu, 26 Nov 2015 09:28:29 +0000 (UTC)	[thread overview]
Message-ID: <1448530105.d924168b217c90faea5781e0c91fed0f5e797aab.jlec@gentoo> (raw)

commit:     d924168b217c90faea5781e0c91fed0f5e797aab
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 26 09:27:15 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Nov 26 09:28:25 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d924168b

dev-python/cssutils: Backport fix for test failures on pypy

Package-Manager: portage-2.2.25
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>

 dev-python/cssutils/cssutils-1.0.1.ebuild          |  6 ++--
 .../files/cssutils-1.0.1-pypy-test-backport.patch  | 32 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/dev-python/cssutils/cssutils-1.0.1.ebuild b/dev-python/cssutils/cssutils-1.0.1.ebuild
index 60fc741..c2be49f 100644
--- a/dev-python/cssutils/cssutils-1.0.1.ebuild
+++ b/dev-python/cssutils/cssutils-1.0.1.ebuild
@@ -20,6 +20,10 @@ RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
 DEPEND="${RDEPEND}
 	test? ( dev-python/mock[${PYTHON_USEDEP}] )"
 
+PATCHES=(
+	"${FILESDIR}"/${P}-pypy-test-backport.patch
+)
+
 python_prepare_all() {
 	# Disable test failing with dev-python/pyxml installed.
 	if has_version dev-python/pyxml; then
@@ -35,8 +39,6 @@ python_prepare_all() {
 }
 
 python_test() {
-	# https://bitbucket.org/cthedot/cssutils/issues/55
-	[[ "${EPYTHON}" =~ "pypy" ]] && return
 	ln -s "${S}/sheets" "${BUILD_DIR}/sheets" || die
 	# esetup.py test
 	# exclude tests that connect to the network

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 0000000..89c7608
--- /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')


             reply	other threads:[~2015-11-26  9:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26  9:28 Justin Lecher [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-03-07 15:45 [gentoo-commits] repo/gentoo:master commit in: dev-python/cssutils/, dev-python/cssutils/files/ Michał Górny
2021-10-22 15:16 Arthur Zamarin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448530105.d924168b217c90faea5781e0c91fed0f5e797aab.jlec@gentoo \
    --to=jlec@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox