git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #30925 from ckauhaus/submit/30892-zodb-test

ZODB: fix broken tests in 5.3.0

commit529c000c08cdb876328e81e87921da8679e1549d authorFrederik Rietdijk <freddyrietdijk@fridh.nl> dateSun 29 Oct 2017, 14:46 (9 years ago) parent358d2d1dccfe68
2 files changed+33
pkgs/development/python-modules/zodb/ZODB-5.3.0-fix-tests.patch+29 pkgs/development/python-modules/zodb/default.nix+4
pkgs/development/python-modules/zodb/ZODB-5.3.0-fix-tests.patchnew file+29
@@ -0,0 +1,29 @@
1+Tests are kind of broken in ZODB-5.3.0. Fix setup code and disable one
2+especially problematic test.
3+
4+diff -u ZODB-5.3.0/setup.py ZODB-5.3.0/setup.py
5+--- ZODB-5.3.0/setup.py 2017-08-30 14:55:10.000000000 +0200
6++++ ZODB-5.3.0/setup.py 2017-10-29 11:34:17.277953730 +0100
7+@@ -85,7 +85,10 @@
8+ mod = __import__(
9+ _modname(dirpath, base, os.path.splitext(filename)[0]),
10+ {}, {}, ['*'])
11+- _unittests_only(suite, mod.test_suite())
12++ try:
13++ _unittests_only(suite, mod.test_suite())
14++ except AttributeError:
15++ pass
16+ elif 'tests.py' in filenames:
17+ mod = __import__(_modname(dirpath, base, 'tests'), {}, {}, ['*'])
18+ _unittests_only(suite, mod.test_suite())
19+diff -u ZODB-5.3.0/src/ZODB/scripts/tests/test_repozo.py ZODB-5.3.0/src/ZODB/scripts/tests/test_repozo.py
20+--- ZODB-5.3.0/src/ZODB/scripts/tests/test_repozo.py 2017-08-30 14:55:10.000000000 +0200
21++++ ZODB-5.3.0/src/ZODB/scripts/tests/test_repozo.py 2017-10-29 11:35:10.348240386 +0100
22+@@ -1184,7 +1184,4 @@
23+ #unittest.makeSuite(Test_do_backup), #TODO
24+ unittest.makeSuite(Test_do_recover),
25+ unittest.makeSuite(Test_do_verify),
26+- # N.B.: this test take forever to run (~40sec on a fast laptop),
27+- # *and* it is non-deterministic.
28+- unittest.makeSuite(MonteCarloTests),
29+ ])
pkgs/development/python-modules/zodb/default.nix+4
@@ -25,6 +25,10 @@ buildPythonPackage rec {
2525 sha256 = "633c2f89481d8ebc55639b59216f7d16d07b44a94758850c0b887006967214f3";
2626 };
2727
28+ patches = [
29+ ./ZODB-5.3.0-fix-tests.patch
30+ ];
31+
2832 propagatedBuildInputs = [
2933 manuel
3034 transaction