2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-08-22 07:53:02 +00:00
|
|
|
, poetry-core
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest
|
2021-08-22 07:53:02 +00:00
|
|
|
, pythonOlder
|
2022-01-07 04:07:37 +00:00
|
|
|
, setuptoolsBuildHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-socket";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.7.0";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miketheman";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "pytest-socket";
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-19YF3q85maCVdVg2HOOPbN45RNjBf6kiFAhLut8B2tQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
buildInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
# pytest-socket require network for majority of tests
|
2020-04-24 23:36:52 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2022-01-07 04:07:37 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pytest_socket"
|
|
|
|
];
|
2021-08-22 07:53:02 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Pytest Plugin to disable socket calls during tests";
|
|
|
|
homepage = "https://github.com/miketheman/pytest-socket";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/miketheman/pytest-socket/blob/${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|