at master 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytest7CheckHook, 6 setuptools, 7 coverage, 8 six, 9}: 10 11buildPythonPackage 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}