Skip to content

Commit d9b07a7

Browse files
python3Packages.doubles: init at 1.5.3 (#357592)
2 parents 9d87ae7 + de09dd2 commit d9b07a7

2 files changed

Lines changed: 67 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
pytest7CheckHook,
6+
setuptools,
7+
coverage,
8+
six,
9+
}:
10+
11+
buildPythonPackage rec {
12+
pname = "doubles";
13+
version = "1.5.3";
14+
pyproject = true;
15+
16+
src = fetchFromGitHub {
17+
owner = "uber";
18+
repo = "doubles";
19+
tag = "v${version}";
20+
hash = "sha256-7yygZ00H2eIGuI/E0dh0j30hicJKBhCqyagY6XAJTCA=";
21+
};
22+
23+
build-system = [
24+
setuptools
25+
];
26+
27+
dependencies = [
28+
coverage
29+
six
30+
];
31+
32+
nativeCheckInputs = [
33+
pytest7CheckHook
34+
];
35+
36+
# To avoid a ValueError: Plugin already registered under a different name:
37+
# doubles.pytest_plugin
38+
pytestFlags = [
39+
"-p"
40+
"no:doubles"
41+
];
42+
43+
disabledTestPaths = [
44+
# nose is deprecated
45+
"test/nose_test.py"
46+
47+
# These tests fail due to an incompatibility between the doubles pytest plugin
48+
# and modern pytest versions (7+). The plugin's verification hook incorrectly
49+
# raises a generic `AssertionError` during teardown, instead of the specific
50+
# exceptions the negative test cases are designed to catch.
51+
"test/allow_test.py"
52+
"test/expect_test.py"
53+
"test/class_double_test.py"
54+
"test/object_double_test.py"
55+
];
56+
57+
pythonImportsCheck = [ "doubles" ];
58+
59+
meta = {
60+
description = "Test doubles for Python";
61+
homepage = "https://github.com/uber/doubles";
62+
license = lib.licenses.mit;
63+
maintainers = with lib.maintainers; [ b-rodrigues ];
64+
};
65+
}

pkgs/top-level/python-packages.nix

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

43514351
doubleratchet = callPackage ../development/python-modules/doubleratchet { };
43524352

4353+
doubles = callPackage ../development/python-modules/doubles { };
4354+
43534355
dowhen = callPackage ../development/python-modules/dowhen { };
43544356

43554357
downloader-cli = callPackage ../development/python-modules/downloader-cli { };

0 commit comments

Comments
 (0)