1{ lib
2, stdenv
3, buildPythonPackage
4, fetchFromGitHub
5# install dependencies
6, pytest
7, vcrpy
8, attrs
9# test dependencies
10, pytestCheckHook
11, pytest-httpbin
12, pytest-mock
13, requests
14}:
15
16buildPythonPackage rec {
17 pname = "pytest-recording";
18 version = "0.12.2";
19
20 src = fetchFromGitHub {
21 owner = "kiwicom";
22 repo = "pytest-recording";
23 rev = "v${version}";
24 hash = "sha256-nivwxaW8AIrBtPkzPJYfxlPxWn2NuYcaMry/IrBnnl0=";
25 };
26
27 buildInputs = [
28 pytest
29 ];
30
31 propagatedBuildInputs = [
32 vcrpy
33 attrs
34 ];
35
36 checkInputs = [
37 pytestCheckHook
38 pytest-httpbin
39 pytest-mock
40 requests
41 ];
42
43 disabledTests = [
44 "test_block_network_with_allowed_hosts"
45 ] ++ lib.optionals stdenv.isDarwin [
46 # Missing socket.AF_NETLINK
47 "test_other_socket"
48 ];
49
50 pytestFlagsArray = [
51 "tests"
52 ];
53
54 pythonImportsCheck = [
55 "pytest_recording"
56 ];
57
58 meta = with lib; {
59 description = "A pytest plugin that allows you recording of network interactions via VCR.py";
60 homepage = "https://github.com/kiwicom/pytest-recording";
61 license = licenses.mit;
62 maintainers = with maintainers; [ jbgosselin ];
63 };
64}