Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pytest-recording / default.nix
blob7a53cbbba882e6fe9fecd5c2543d484a7b82b49f
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 # install dependencies
6 , pytest
7 , vcrpy
8 # test dependencies
9 , hatchling
10 , pytestCheckHook
11 , pytest-httpbin
12 , pytest-mock
13 , requests
16 buildPythonPackage rec {
17   pname = "pytest-recording";
18   version = "0.13.0";
19   format = "pyproject";
21   src = fetchFromGitHub {
22     owner = "kiwicom";
23     repo = "pytest-recording";
24     rev = "v${version}";
25     hash = "sha256-SCHdzii6GYVWVY7MW/IW6CNZMuu5h/jXEj49P0jvhoE=";
26   };
28   buildInputs = [
29     hatchling
30     pytest
31   ];
33   propagatedBuildInputs = [
34     vcrpy
35   ];
37   __darwinAllowLocalNetworking = true;
39   checkInputs = [
40     pytestCheckHook
41     pytest-httpbin
42     pytest-mock
43     requests
44   ];
46   disabledTests = [
47     "test_block_network_with_allowed_hosts"
48   ] ++ lib.optionals stdenv.isDarwin [
49     # Missing socket.AF_NETLINK
50     "test_other_socket"
51   ];
53   pytestFlagsArray = [
54     "tests"
55   ];
57   pythonImportsCheck = [
58     "pytest_recording"
59   ];
61   meta = with lib; {
62     description = "A pytest plugin that allows you recording of network interactions via VCR.py";
63     homepage = "https://github.com/kiwicom/pytest-recording";
64     license = licenses.mit;
65     maintainers = with maintainers; [ jbgosselin ];
66   };