about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytest-timeout/default.nix
blob: c0a97dd414ac136871fe571401081c5a50b51bcb (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
45
46
47
48
49
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, pytestCheckHook
, pexpect
}:

buildPythonPackage rec {
  pname = "pytest-timeout";
  version = "2.2.0";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-OwuV2r88tQusnvXKkS+gz8KGUmrxevyAaCTfIML3LJA=";
  };

  buildInputs = [
    pytest
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pexpect
  ];

  disabledTests = [
    "test_suppresses_timeout_when_pdb_is_entered"
    # Remove until https://github.com/pytest-dev/pytest/pull/7207 or similar
    "test_suppresses_timeout_when_debugger_is_entered"
  ];

  pytestFlagsArray = [
    "-ra"
  ];

  pythonImportsCheck = [
    "pytest_timeout"
  ];

  meta = with lib; {
    description = "Pytest plugin to abort hanging tests";
    homepage = "https://github.com/pytest-dev/pytest-timeout/";
    changelog = "https://github.com/pytest-dev/pytest-timeout/#changelog";
    license = licenses.mit;
    maintainers = with maintainers; [ makefu ];
  };
}