Skip to content

Commit 6322dd1

Browse files
python3Packages.pytest-retry: init at 1.7.0
1 parent 20b2600 commit 6322dd1

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
pytest,
6+
pytestCheckHook,
7+
setuptools,
8+
}:
9+
10+
buildPythonPackage rec {
11+
pname = "pytest-retry";
12+
version = "1.7.0";
13+
pyproject = true;
14+
15+
src = fetchFromGitHub {
16+
owner = "str0zzapreti";
17+
repo = "pytest-retry";
18+
tag = version;
19+
hash = "sha256-Gf+L7zvC1FGAm0Wd6E6fV3KynassoGyHSD0CPgEJ02k=";
20+
};
21+
22+
build-system = [ setuptools ];
23+
24+
dependencies = [ pytest ];
25+
26+
nativeCheckInputs = [ pytestCheckHook ];
27+
28+
pythonImportsCheck = [ "pytest_retry" ];
29+
30+
meta = {
31+
description = "Plugin for retrying flaky tests in CI environments";
32+
longDescription = ''
33+
This plugin adds a decorator to mark tests as flaky: `@pytest.mark.flaky(retries=3, delay=1)`.
34+
'';
35+
homepage = "https://github.com/str0zzapreti/pytest-retry";
36+
changelog = "https://github.com/str0zzapreti/pytest-retry/releases/tag/${src.tag}";
37+
license = lib.licenses.mit;
38+
maintainers = with lib.maintainers; [ fliegendewurst ];
39+
};
40+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13649,6 +13649,8 @@ self: super: with self; {
1364913649

1365013650
pytest-responses = callPackage ../development/python-modules/pytest-responses { };
1365113651

13652+
pytest-retry = callPackage ../development/python-modules/pytest-retry { };
13653+
1365213654
pytest-reverse = callPackage ../development/python-modules/pytest-reverse { };
1365313655

1365413656
pytest-ruff = callPackage ../development/python-modules/pytest-ruff { };

0 commit comments

Comments
 (0)