2021-12-08 09:03:22 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2022-07-15 00:12:17 +02:00
|
|
|
callPackage,
|
2021-12-08 09:03:22 +01:00
|
|
|
fetchFromGitHub,
|
|
|
|
pytest,
|
|
|
|
pythonOlder,
|
2022-01-13 19:37:20 -08:00
|
|
|
setuptools-scm,
|
2021-12-08 09:03:22 +01:00
|
|
|
}:
|
|
|
|
|
2017-04-26 14:28:39 +02:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-asyncio";
|
2024-03-24 02:53:43 +01:00
|
|
|
version = "0.23.6"; # N.B.: when updating, tests bleak and aioesphomeapi tests
|
2024-01-11 08:59:10 -08:00
|
|
|
pyproject = true;
|
2017-04-26 14:28:39 +02:00
|
|
|
|
2024-01-11 08:59:10 -08:00
|
|
|
disabled = pythonOlder "3.8";
|
2017-05-02 22:10:58 +02:00
|
|
|
|
2021-12-08 09:03:22 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytest-dev";
|
2024-01-11 08:59:10 -08:00
|
|
|
repo = "pytest-asyncio";
|
2022-07-16 12:59:29 +02:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-03-24 02:53:43 +01:00
|
|
|
hash = "sha256-+kyKcVzW05kqtLeC81rk3fJpOtyW3xSYshgl5gqIddE=";
|
2017-04-26 14:28:39 +02:00
|
|
|
};
|
|
|
|
|
2022-07-15 00:12:17 +02:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"testout"
|
|
|
|
];
|
|
|
|
|
2022-01-13 19:37:20 -08:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
|
|
|
|
2022-04-12 01:18:24 +00:00
|
|
|
buildInputs = [ pytest ];
|
2017-04-26 14:28:39 +02:00
|
|
|
|
2022-07-15 00:12:17 +02:00
|
|
|
postInstall = ''
|
|
|
|
mkdir $testout
|
|
|
|
cp -R tests $testout/tests
|
|
|
|
'';
|
2018-06-12 19:00:07 +02:00
|
|
|
|
2022-07-15 00:12:17 +02:00
|
|
|
doCheck = false;
|
|
|
|
passthru.tests.pytest = callPackage ./tests.nix { };
|
2022-04-12 01:18:24 +00:00
|
|
|
|
2021-12-08 09:03:22 +01:00
|
|
|
pythonImportsCheck = [ "pytest_asyncio" ];
|
2018-08-25 07:52:04 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2022-02-09 23:37:47 +00:00
|
|
|
description = "Library for testing asyncio code with pytest";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://github.com/pytest-dev/pytest-asyncio";
|
2023-03-23 22:42:13 -07:00
|
|
|
changelog = "https://github.com/pytest-dev/pytest-asyncio/blob/v${version}/docs/source/reference/changelog.rst";
|
2021-12-08 09:03:22 +01:00
|
|
|
license = licenses.asl20;
|
2022-02-09 23:37:47 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2017-04-26 14:28:39 +02:00
|
|
|
};
|
|
|
|
}
|