nixpkgs/pkgs/development/python-modules/pytest-mock/default.nix
2018-02-12 12:46:21 +01:00

25 lines
691 B
Nix

{ lib, buildPythonPackage, fetchPypi, isPy3k, pytest, mock, setuptools_scm }:
buildPythonPackage rec {
pname = "pytest-mock";
version = "1.6.3";
src = fetchPypi {
inherit pname version;
sha256 = "920d1167af5c2c2ad3fa0717d0c6c52e97e97810160c15721ac895cac53abb1c";
};
propagatedBuildInputs = [ pytest ] ++ lib.optional (!isPy3k) mock;
nativeBuildInputs = [ setuptools_scm ];
checkPhase = ''
py.test
'';
meta = with lib; {
description = "Thin-wrapper around the mock package for easier use with py.test.";
homepage = https://github.com/pytest-dev/pytest-mock;
license = licenses.mit;
maintainers = with maintainers; [ nand0p ];
};
}