From 78f9c2d1732bf9de0c4a142b0b65bbe848bf6d63 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 4 Jul 2019 06:49:46 -0700 Subject: [PATCH] pythonPackages.sumo: fix tests --- .../python-modules/sumo/default.nix | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/sumo/default.nix b/pkgs/development/python-modules/sumo/default.nix index 1b82f1a40105..504d91212874 100644 --- a/pkgs/development/python-modules/sumo/default.nix +++ b/pkgs/development/python-modules/sumo/default.nix @@ -1,4 +1,14 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, numpy, scipy, spglib, pymatgen, h5py, matplotlib, seekpath, phonopy }: +{ stdenv, buildPythonPackage, fetchFromGitHub, isPy27 +, h5py +, matplotlib +, numpy +, phonopy +, pymatgen +, pytest +, scipy +, seekpath +, spglib +}: buildPythonPackage rec { pname = "sumo"; @@ -13,12 +23,20 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ numpy scipy spglib pymatgen h5py matplotlib seekpath phonopy ]; - + + checkInputs = [ pytest ]; + + checkPhase = '' + pytest . + ''; + + # tests have type annotations, can only run on 3.5+ + doCheck = (!isPy27); + meta = with stdenv.lib; { description = "Toolkit for plotting and analysis of ab initio solid-state calculation data"; - homepage = https://github.com/SMTG-UCL/sumo; + homepage = "https://github.com/SMTG-UCL/sumo"; license = licenses.mit; maintainers = with maintainers; [ psyanticy ]; }; } -