git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.zodb: fix tests

Tests failed after `persistent` was updated to 4.4. Apply an upstream patch to fix them.

commitb54677969bbd5f8912b753e73603c99ce1b4fafd authorUli Baum <xeji@cat3.de> dateThu 13 Sep 2018, 13:34 (8 years ago) parenteb88142
2 files changed+36−5
pkgs/development/python-modules/zodb/default.nix+10−5 pkgs/development/python-modules/zodb/fix-tests-with-persistent-4.4.patch+26
pkgs/development/python-modules/zodb/default.nix+10−5
@@ -4,7 +4,6 @@
44, zope_testrunner
55, transaction
66, six
7−, wheel
87, zope_interface
98, zodbpickle
109, zconfig
@@ -24,15 +23,16 @@ buildPythonPackage rec {
2423 };
2524
2625 patches = [
27− ./ZODB-5.3.0-fix-tests.patch
26+ ./ZODB-5.3.0-fix-tests.patch # still needeed with 5.4.0
27+ # Upstream patch to fix tests with persistent 4.4,
28+ # cannot fetchpatch because only one hunk of the upstream commit applies.
29+ # TODO remove on next release
30+ ./fix-tests-with-persistent-4.4.patch
2831 ];
2932
3033 propagatedBuildInputs = [
31− manuel
3234 transaction
33− zope_testrunner
3435 six
35− wheel
3636 zope_interface
3737 zodbpickle
3838 zconfig
@@ -41,6 +41,11 @@ buildPythonPackage rec {
4141 BTrees
4242 ];
4343
44+ checkInputs = [
45+ manuel
46+ zope_testrunner
47+ ];
48+
4449 meta = with stdenv.lib; {
4550 description = "Zope Object Database: object database and persistence";
4651 homepage = https://pypi.python.org/pypi/ZODB;
pkgs/development/python-modules/zodb/fix-tests-with-persistent-4.4.patchnew file+26
@@ -0,0 +1,26 @@
1+From 2d0ae7199501795617a82a32bafe19b4b5ae89c3 Mon Sep 17 00:00:00 2001
2+From: Jason Madden <jamadden@gmail.com>
3+Date: Wed, 22 Aug 2018 10:43:19 -0500
4+Subject: [PATCH] Fix tests with, and depend on, persistent 4.4.
5+
6+Fixes #213.
7+---
8+ src/ZODB/tests/util.py | 5 +++++
9+ 3 files changed, 9 insertions(+), 3 deletions(-)
10+
11+diff --git a/src/ZODB/tests/util.py b/src/ZODB/tests/util.py
12+index 4ffde92c1..e9bf547fa 100644
13+--- a/src/ZODB/tests/util.py
14++++ b/src/ZODB/tests/util.py
15+@@ -37,6 +37,11 @@
16+ r"\1"),
17+ (re.compile('b(".*?")'),
18+ r"\1"),
19++ # Persistent 4.4 changes the repr of persistent subclasses,
20++ # and it is slightly different with the C extension and
21++ # pure-Python module
22++ (re.compile('ZODB.tests.testcrossdatabasereferences.'),
23++ ''),
24+ # Python 3 adds module name to exceptions.
25+ (re.compile("ZODB.interfaces.BlobError"),
26+ r"BlobError"),