1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytest,
7 pythonOlder,
8}:
9
10buildPythonPackage rec {
11 pname = "pytest-socket";
12 version = "0.7.0";
13 pyproject = true;
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "miketheman";
19 repo = "pytest-socket";
20 tag = version;
21 hash = "sha256-19YF3q85maCVdVg2HOOPbN45RNjBf6kiFAhLut8B2tQ=";
22 };
23
24 nativeBuildInputs = [ poetry-core ];
25
26 buildInputs = [ pytest ];
27
28 # pytest-socket require network for majority of tests
29 doCheck = false;
30
31 pythonImportsCheck = [ "pytest_socket" ];
32
33 meta = with lib; {
34 description = "Pytest Plugin to disable socket calls during tests";
35 homepage = "https://github.com/miketheman/pytest-socket";
36 changelog = "https://github.com/miketheman/pytest-socket/blob/${version}/CHANGELOG.md";
37 license = licenses.mit;
38 maintainers = [ ];
39 };
40}