summary refs log tree commit diff
path: root/pkgs/development/python-modules/nose-timer/default.nix
blob: bbc164c85e2b07577871c2500176e44237b11eef (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib
, buildPythonPackage
, fetchFromGitHub
, nose
, mock
, parameterized
, termcolor
}:

buildPythonPackage rec {
  pname = "nose-timer";
  version = "1.0.1";

  src = fetchFromGitHub {
    owner = "mahmoudimus";
    repo = pname;
    rev = "v${version}";
    sha256 = "0xsai2l5i1av62y9y0q63wy2zk27klmf2jizgghhxg2y8nfa8x3x";
  };

  propagatedBuildInputs = [ nose ];

  checkInputs = [
    mock
    nose
    parameterized
    termcolor
  ];

  checkPhase = ''
    runHook preCheck
    nosetests --verbosity 2 tests
    runHook postCheck
  '';

  pythonImportsCheck = [ "nosetimer" ];

  meta = with lib; {
    description = "A timer plugin for nosetests";
    homepage = "https://github.com/mahmoudimus/nose-timer";
    license = licenses.mit;
    maintainers = with maintainers; [ doronbehar ];
  };
}