summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pytest-retry/default.nix
blob: 599e06e1fc99ee5a4bf75ab2cd665d8206086875 (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
36
37
38
39
40
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytest,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage rec {
  pname = "pytest-retry";
  version = "1.7.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "str0zzapreti";
    repo = "pytest-retry";
    tag = version;
    hash = "sha256-Gf+L7zvC1FGAm0Wd6E6fV3KynassoGyHSD0CPgEJ02k=";
  };

  build-system = [ setuptools ];

  dependencies = [ pytest ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "pytest_retry" ];

  meta = {
    description = "Plugin for retrying flaky tests in CI environments";
    longDescription = ''
      This plugin adds a decorator to mark tests as flaky: `@pytest.mark.flaky(retries=3, delay=1)`.
    '';
    homepage = "https://github.com/str0zzapreti/pytest-retry";
    changelog = "https://github.com/str0zzapreti/pytest-retry/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fliegendewurst ];
  };
}