about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytest-mock/default.nix
blob: 68c16725cd450e2fffeec1ddb620168158be273f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ lib, buildPythonPackage, fetchPypi, isPy3k, pytest, mock, setuptools_scm }:

buildPythonPackage rec {
  pname = "pytest-mock";
  version = "1.10.4";

  src = fetchPypi {
    inherit pname version;
    sha256 = "5bf5771b1db93beac965a7347dc81c675ec4090cb841e49d9d34637a25c30568";
  };

  propagatedBuildInputs = lib.optional (!isPy3k) mock;
  nativeBuildInputs = [ setuptools_scm pytest ];

  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 ];
  };
}