summary refs log tree commit diff
path: root/pkgs/top-level
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2018-05-30 06:23:46 +0000
committerOrivej Desh <orivej@gmx.fr>2018-05-30 06:23:46 +0000
commitac8dc50c5db723f7a93495272f359e3d5d98ae98 (patch)
tree10b0c514c336063a42aa425c9a85220b47a7e407 /pkgs/top-level
parenta94021ef40bbc9f3f5b74310724e02bc369aea6d (diff)
downloadnixlib-ac8dc50c5db723f7a93495272f359e3d5d98ae98.tar
nixlib-ac8dc50c5db723f7a93495272f359e3d5d98ae98.tar.gz
nixlib-ac8dc50c5db723f7a93495272f359e3d5d98ae98.tar.bz2
nixlib-ac8dc50c5db723f7a93495272f359e3d5d98ae98.tar.lz
nixlib-ac8dc50c5db723f7a93495272f359e3d5d98ae98.tar.xz
nixlib-ac8dc50c5db723f7a93495272f359e3d5d98ae98.tar.zst
nixlib-ac8dc50c5db723f7a93495272f359e3d5d98ae98.zip
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
Diffstat (limited to 'pkgs/top-level')
-rw-r--r--pkgs/top-level/python-packages.nix5
1 files changed, 5 insertions, 0 deletions
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;