1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytest
5, pytestCheckHook
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "pytest-raises";
11 version = "0.11";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "Lemmons";
18 repo = pname;
19 rev = "refs/tags/${version}";
20 hash = "sha256-wmtWPWwe1sFbWSYxs5ZXDUZM1qvjRGMudWdjQeskaz0=";
21 };
22
23 buildInputs = [
24 pytest
25 ];
26
27 nativeCheckInputs = [
28 pytestCheckHook
29 ];
30
31 pythonImportsCheck = [
32 "pytest_raises"
33 ];
34
35 disabledTests = [
36 # Failed: nomatch: '*::test_pytest_mark_raises_unexpected_exception FAILED*'
37 # https://github.com/Lemmons/pytest-raises/issues/30
38 "test_pytest_mark_raises_unexpected_exception"
39 "test_pytest_mark_raises_unexpected_match"
40 "test_pytest_mark_raises_parametrize"
41 ];
42
43 meta = with lib; {
44 description = "An implementation of pytest.raises as a pytest.mark fixture";
45 homepage = "https://github.com/Lemmons/pytest-raises";
46 license = with licenses; [ mit ];
47 maintainers = with maintainers; [ fab ];
48 };
49}