aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/pytest-timeout/default.nix
blob: 30bd93e433dc483396b7dadaf85a922822e4aa77 (plain)
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
{ buildPythonPackage
, fetchPypi
, fetchpatch
, lib
, pexpect
, pytest
}:

buildPythonPackage rec {
  pname = "pytest-timeout";
  version = "1.3.3";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1cczcjhw4xx5sjkhxlhc5c1bkr7x6fcyx12wrnvwfckshdvblc2a";
  };

  patches = fetchpatch {
    url = "https://bitbucket.org/pytest-dev/pytest-timeout/commits/36998c891573d8ec1db1acd4f9438cb3cf2aee2e/raw";
    sha256 = "05zc2w7mjgv8rm8i1cbxp7k09vlscmay5iy78jlzgjqkrx3wkf46";
  };

  checkInputs = [ pytest pexpect ];
  checkPhase = ''
    # test_suppresses_timeout_when_pdb_is_entered fails under heavy load
    pytest -ra -k 'not test_suppresses_timeout_when_pdb_is_entered'
  '';

  meta = with lib;{
    description = "py.test plugin to abort hanging tests";
    homepage = "https://bitbucket.org/pytest-dev/pytest-timeout/";
    license = licenses.mit;
    maintainers = with maintainers; [ makefu costrouc ];
  };
}