summary refs log tree commit diff
path: root/pkgs/development/python-modules/zodb
diff options
context:
space:
mode:
authorChristian Kauhaus <kc@flyingcircus.io>2017-10-29 12:16:03 +0100
committerChristian Kauhaus <kc@flyingcircus.io>2017-10-29 12:31:46 +0100
commitdccfe68ade164c6d3242bf1ba24d5482d02fb88e (patch)
treeb8822f32719923efa1211f7f6f591cc77d9e978b /pkgs/development/python-modules/zodb
parentbd7074961a82905336768e41233f5d69be4451a0 (diff)
downloadnixlib-dccfe68ade164c6d3242bf1ba24d5482d02fb88e.tar
nixlib-dccfe68ade164c6d3242bf1ba24d5482d02fb88e.tar.gz
nixlib-dccfe68ade164c6d3242bf1ba24d5482d02fb88e.tar.bz2
nixlib-dccfe68ade164c6d3242bf1ba24d5482d02fb88e.tar.lz
nixlib-dccfe68ade164c6d3242bf1ba24d5482d02fb88e.tar.xz
nixlib-dccfe68ade164c6d3242bf1ba24d5482d02fb88e.tar.zst
nixlib-dccfe68ade164c6d3242bf1ba24d5482d02fb88e.zip
ZODB 5.3.0: fix broken tests
Re #30892
Diffstat (limited to 'pkgs/development/python-modules/zodb')
-rw-r--r--pkgs/development/python-modules/zodb/ZODB-5.3.0-fix-tests.patch29
-rw-r--r--pkgs/development/python-modules/zodb/default.nix4
2 files changed, 33 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/zodb/ZODB-5.3.0-fix-tests.patch b/pkgs/development/python-modules/zodb/ZODB-5.3.0-fix-tests.patch
new file mode 100644
index 000000000000..b6bcedea91a8
--- /dev/null
+++ b/pkgs/development/python-modules/zodb/ZODB-5.3.0-fix-tests.patch
@@ -0,0 +1,29 @@
+Tests are kind of broken in ZODB-5.3.0. Fix setup code and disable one
+especially problematic test.
+
+diff -u ZODB-5.3.0/setup.py ZODB-5.3.0/setup.py
+--- ZODB-5.3.0/setup.py	2017-08-30 14:55:10.000000000 +0200
++++ ZODB-5.3.0/setup.py	2017-10-29 11:34:17.277953730 +0100
+@@ -85,7 +85,10 @@
+                     mod = __import__(
+                         _modname(dirpath, base, os.path.splitext(filename)[0]),
+                         {}, {}, ['*'])
+-                    _unittests_only(suite, mod.test_suite())
++                    try:
++                        _unittests_only(suite, mod.test_suite())
++                    except AttributeError:
++                        pass
+         elif 'tests.py' in filenames:
+             mod = __import__(_modname(dirpath, base, 'tests'), {}, {}, ['*'])
+             _unittests_only(suite, mod.test_suite())
+diff -u ZODB-5.3.0/src/ZODB/scripts/tests/test_repozo.py ZODB-5.3.0/src/ZODB/scripts/tests/test_repozo.py
+--- ZODB-5.3.0/src/ZODB/scripts/tests/test_repozo.py	2017-08-30 14:55:10.000000000 +0200
++++ ZODB-5.3.0/src/ZODB/scripts/tests/test_repozo.py	2017-10-29 11:35:10.348240386 +0100
+@@ -1184,7 +1184,4 @@
+         #unittest.makeSuite(Test_do_backup),  #TODO
+         unittest.makeSuite(Test_do_recover),
+         unittest.makeSuite(Test_do_verify),
+-        # N.B.:  this test take forever to run (~40sec on a fast laptop),
+-        # *and* it is non-deterministic.
+-        unittest.makeSuite(MonteCarloTests),
+     ])
diff --git a/pkgs/development/python-modules/zodb/default.nix b/pkgs/development/python-modules/zodb/default.nix
index 5a318b5d040b..232acaec506c 100644
--- a/pkgs/development/python-modules/zodb/default.nix
+++ b/pkgs/development/python-modules/zodb/default.nix
@@ -25,6 +25,10 @@ buildPythonPackage rec {
       sha256 = "633c2f89481d8ebc55639b59216f7d16d07b44a94758850c0b887006967214f3";
     };
 
+    patches = [
+      ./ZODB-5.3.0-fix-tests.patch
+    ];
+
     propagatedBuildInputs = [
       manuel
       transaction