2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
callPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytest,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools-scm,
|
2022-01-13 20:06:32 +00:00
|
|
|
}:
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-asyncio";
|
2024-07-31 10:19:44 +00:00
|
|
|
version = "0.23.8"; # N.B.: when updating, tests bleak and aioesphomeapi tests
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytest-dev";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "pytest-asyncio";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-31 10:19:44 +00:00
|
|
|
hash = "sha256-kMv0crYuYHi1LF+VlXizZkG87kSL7xzsKq9tP9LgFVY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"testout"
|
|
|
|
];
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
build-system = [ setuptools-scm ];
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ pytest ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir $testout
|
|
|
|
cp -R tests $testout/tests
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
doCheck = false;
|
2024-06-05 15:53:02 +00:00
|
|
|
passthru.tests.pytest = callPackage ./tests.nix { };
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pytest_asyncio" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-03-30 09:31:56 +00:00
|
|
|
description = "Library for testing asyncio code with pytest";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/pytest-dev/pytest-asyncio";
|
2023-08-10 07:59:29 +00:00
|
|
|
changelog = "https://github.com/pytest-dev/pytest-asyncio/blob/v${version}/docs/source/reference/changelog.rst";
|
2022-01-13 20:06:32 +00:00
|
|
|
license = licenses.asl20;
|
2022-03-30 09:31:56 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|