1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/pytest-mock/default.nix

42 lines
838 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, isPy3k
, pytest
, mock
, setuptools_scm
}:
buildPythonPackage rec {
pname = "pytest-mock";
2020-08-16 18:31:13 +01:00
version = "3.2.0";
2019-02-14 07:37:27 +00:00
src = fetchPypi {
inherit pname version;
2020-08-16 18:31:13 +01:00
sha256 = "7122d55505d5ed5a6f3df940ad174b3f606ecae5e9bc379569cdcbd4cd9d2b83";
};
2019-02-14 07:37:27 +00:00
propagatedBuildInputs = lib.optional (!isPy3k) mock;
nativeBuildInputs = [
setuptools_scm
];
checkInputs = [
pytest
];
# ignore test which only works with pytest5 output structure
checkPhase = ''
pytest -k 'not detailed_introspection_async'
'';
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 ];
};
}