summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2013-06-24 04:23:36 +0000
committerIan Delaney <idella4@gentoo.org>2013-06-24 04:23:36 +0000
commit82ff2ff2b4ab754df87ee45fd65d59c3bc045e09 (patch)
tree59edcc0c5bc5f94b48682d3a73644782ecf36c52 /dev-python/hglib
parentVersion bump, see http://www.winehq.org/announce/1.6-rc3 for the announcement... (diff)
downloadhistorical-82ff2ff2b4ab754df87ee45fd65d59c3bc045e09.tar.gz
historical-82ff2ff2b4ab754df87ee45fd65d59c3bc045e09.tar.bz2
historical-82ff2ff2b4ab754df87ee45fd65d59c3bc045e09.zip
patch to fix tests, acquired http://bz.selenic.com/show_bug.cgi?id=3965
Package-Manager: portage-2.1.11.63/cvs/Linux x86_64 Manifest-Sign-Key: 0xB8072B0D
Diffstat (limited to 'dev-python/hglib')
-rw-r--r--dev-python/hglib/ChangeLog6
-rw-r--r--dev-python/hglib/files/hglib-0.9-pypy-tests.patch86
-rw-r--r--dev-python/hglib/hglib-0.9.ebuild5
3 files changed, 93 insertions, 4 deletions
diff --git a/dev-python/hglib/ChangeLog b/dev-python/hglib/ChangeLog
index ca73199b491c..1ed179cc798c 100644
--- a/dev-python/hglib/ChangeLog
+++ b/dev-python/hglib/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-python/hglib
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/hglib/ChangeLog,v 1.7 2013/06/23 02:48:20 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/hglib/ChangeLog,v 1.8 2013/06/24 04:23:36 idella4 Exp $
+
+ 24 Jun 2013; Ian Delaney <idella4@gentoo.org>
+ +files/hglib-0.9-pypy-tests.patch, hglib-0.9.ebuild:
+ patch to fix tests, acquired http://bz.selenic.com/show_bug.cgi?id=3965
*hglib-1.0 (23 Jun 2013)
diff --git a/dev-python/hglib/files/hglib-0.9-pypy-tests.patch b/dev-python/hglib/files/hglib-0.9-pypy-tests.patch
new file mode 100644
index 000000000000..1c56f501f495
--- /dev/null
+++ b/dev-python/hglib/files/hglib-0.9-pypy-tests.patch
@@ -0,0 +1,86 @@
+# HG changeset patch
+# User Matt Mackall <mpm@selenic.com>
+# Date 1372027936 18000
+# Node ID e738d6fe5f3ff613a4ee2c0d759eee0ee4f5c9ff
+# Parent 59cb26bf866e793b184842ad23f82fc3551d1742
+tests: make the tests work under Pypy (issue3965)
+
+..which needs explicit close() due to lack of reference counting.
+
+diff -r 59cb26bf866e -r e738d6fe5f3f tests/test-config.py
+--- a/tests/test-config.py Fri Jun 14 18:36:56 2013 +0300
++++ b/tests/test-config.py Sun Jun 23 17:52:16 2013 -0500
+@@ -3,7 +3,9 @@
+ class test_config(common.basetest):
+ def setUp(self):
+ common.basetest.setUp(self)
+- open('.hg/hgrc', 'a').write('[section]\nkey=value\n')
++ f = open('.hg/hgrc', 'a')
++ f.write('[section]\nkey=value\n')
++ f.close()
+ self.client = hglib.open()
+
+ def test_basic(self):
+diff -r 59cb26bf866e -r e738d6fe5f3f tests/test-import.py
+--- a/tests/test-import.py Fri Jun 14 18:36:56 2013 +0300
++++ b/tests/test-import.py Sun Jun 23 17:52:16 2013 -0500
+@@ -22,7 +22,9 @@
+ self.assertEquals(self.client.cat(['a']), '1\n')
+
+ def test_basic_file(self):
+- open('patch', 'wb').write(patch)
++ f = open('patch', 'wb')
++ f.write(patch)
++ f.close()
+
+ # --no-commit
+ self.client.import_(['patch'], nocommit=True)
+diff -r 59cb26bf866e -r e738d6fe5f3f tests/test-paths.py
+--- a/tests/test-paths.py Fri Jun 14 18:36:56 2013 +0300
++++ b/tests/test-paths.py Sun Jun 23 17:52:16 2013 -0500
+@@ -3,7 +3,9 @@
+
+ class test_paths(common.basetest):
+ def test_basic(self):
+- open('.hg/hgrc', 'a').write('[paths]\nfoo = bar\n')
++ f = open('.hg/hgrc', 'a')
++ f.write('[paths]\nfoo = bar\n')
++ f.close()
+
+ # hgrc isn't watched for changes yet, have to reopen
+ self.client = hglib.open()
+diff -r 59cb26bf866e -r e738d6fe5f3f tests/test-update.py
+--- a/tests/test-update.py Fri Jun 14 18:36:56 2013 +0300
++++ b/tests/test-update.py Sun Jun 23 17:52:16 2013 -0500
+@@ -33,7 +33,9 @@
+ self.client.commit('fourth')
+ self.client.update(rev2)
+ old = open('a').read()
+- open('a', 'wb').write('a' + old)
++ f = open('a', 'wb')
++ f.write('a' + old)
++ f.close()
+ u, m, r, ur = self.client.update()
+ self.assertEquals(u, 0)
+ self.assertEquals(m, 1)
+@@ -68,12 +70,16 @@
+ self.assertEquals(old, open('a').read())
+
+ def test_basic_plain(self):
+- open('.hg/hgrc', 'a').write('[defaults]\nupdate=-v\n')
++ f = open('.hg/hgrc', 'a')
++ f.write('[defaults]\nupdate=-v\n')
++ f.close()
+ self.test_basic()
+
+ def test_largefiles(self):
+ import os
+- open('.hg/hgrc', 'a').write('[extensions]\nlargefiles=\n')
++ f = open('.hg/hgrc', 'a')
++ f.write('[extensions]\nlargefiles=\n')
++ f.close()
+ self.append('b', 'a')
+ try:
+ self.client.rawcommand(['add', 'b', '--large'])
+
+
diff --git a/dev-python/hglib/hglib-0.9.ebuild b/dev-python/hglib/hglib-0.9.ebuild
index ff1712328a6f..774dfd5942a0 100644
--- a/dev-python/hglib/hglib-0.9.ebuild
+++ b/dev-python/hglib/hglib-0.9.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/hglib/hglib-0.9.ebuild,v 1.1 2013/06/18 14:02:06 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/hglib/hglib-0.9.ebuild,v 1.2 2013/06/24 04:23:36 idella4 Exp $
EAPI=5
PYTHON_COMPAT=( python2_7 pypy{1_9,2_0} )
@@ -26,10 +26,9 @@ DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
S=${WORKDIR}/${MY_P}
-PATCHES=( "${FILESDIR}"/${PN}-0.3-tests.patch )
+PATCHES=( "${FILESDIR}"/${P}-pypy-tests.patch )
python_test() {
- # http://bz.selenic.com/show_bug.cgi?id=3965
if ! ${PYTHON} test.py; then
die "Tests failed under ${EPYTHON}"
fi