summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-03-31 20:43:32 +0200
committerRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-03-31 20:43:32 +0200
commitee1896d63dec108be02489f73b677ace1c656a74 (patch)
tree6efceeb314a9d78af9a1c5a0e3d52ea20a3e60c8 /pkgs/development
parentdb0fa06fce8adc85e49a0ffcf0f0bad85220ff89 (diff)
downloadnixlib-ee1896d63dec108be02489f73b677ace1c656a74.tar
nixlib-ee1896d63dec108be02489f73b677ace1c656a74.tar.gz
nixlib-ee1896d63dec108be02489f73b677ace1c656a74.tar.bz2
nixlib-ee1896d63dec108be02489f73b677ace1c656a74.tar.lz
nixlib-ee1896d63dec108be02489f73b677ace1c656a74.tar.xz
nixlib-ee1896d63dec108be02489f73b677ace1c656a74.tar.zst
nixlib-ee1896d63dec108be02489f73b677ace1c656a74.zip
pythonPackages.nipype: enable tests
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/nipype/default.nix18
1 files changed, 15 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/nipype/default.nix b/pkgs/development/python-modules/nipype/default.nix
index 2ea6a10a5533..668e34a22476 100644
--- a/pkgs/development/python-modules/nipype/default.nix
+++ b/pkgs/development/python-modules/nipype/default.nix
@@ -21,8 +21,12 @@
 , simplejson
 , traits
 , xvfbwrapper
+, pytestcov
+, codecov
 # other dependencies
 , which
+, bash
+, glibcLocales
 }:
 
 assert !isPy3k -> configparser != null;
@@ -39,9 +43,11 @@ buildPythonPackage rec {
   # see https://github.com/nipy/nipype/issues/2240
   patches = [ ./prov-version.patch ];
 
-  doCheck = false;  # fails with TypeError: None is not callable
-  checkInputs = [ which ];
-  buildInputs = [ pytest mock ];  # required in installPhase
+  postPatch = ''
+    substituteInPlace nipype/interfaces/base/tests/test_core.py \
+      --replace "/usr/bin/env bash" "${bash}/bin/bash"
+  '';
+
   propagatedBuildInputs = [
     click
     dateutil
@@ -62,6 +68,12 @@ buildPythonPackage rec {
     configparser
   ];
 
+  checkInputs = [ pytest mock pytestcov codecov which glibcLocales ];
+
+  checkPhase = ''
+    LC_ALL="en_US.UTF-8" py.test -v --doctest-modules nipype
+  '';
+
   meta = with stdenv.lib; {
     homepage = http://nipy.org/nipype/;
     description = "Neuroimaging in Python: Pipelines and Interfaces";