From ac8dc50c5db723f7a93495272f359e3d5d98ae98 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Wed, 30 May 2018 06:23:46 +0000 Subject: [PATCH] pythonPackages.pypeg2: fix nondeterministic test failure If test_xmlast runs before test_pyPEG2, the tests fail with: ERROR: runTest (pypeg2.test.test_pyPEG2.ParseInvisibleTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/build/pyPEG2-2.15.2/pypeg2/test/test_pyPEG2.py", line 258, in runTest self.assertEqual(r._ignore1, None) AttributeError: 'C1' object has no attribute '_ignore1' https://hydra.nixos.org/build/74632015 --- pkgs/top-level/python-packages.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3b0946a0579c..7023ff68e71f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -16941,6 +16941,11 @@ EOF sha256 = "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"; }; + checkPhase = '' + # The tests assume that test_xmlast does not run before test_pyPEG2. + python -m unittest pypeg2.test.test_pyPEG2 pypeg2.test.test_xmlast + ''; + #https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35 doCheck = !isPy3k;