2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-08-12 12:06:08 +00:00
|
|
|
, callPackage
|
2022-01-13 20:06:32 +00:00
|
|
|
, fetchFromGitHub
|
2022-02-10 20:34:41 +00:00
|
|
|
, flaky
|
2022-01-13 20:06:32 +00:00
|
|
|
, hypothesis
|
|
|
|
, pytest
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2022-02-10 20:34:41 +00:00
|
|
|
, setuptools-scm
|
2022-01-13 20:06:32 +00:00
|
|
|
}:
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-asyncio";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "0.20.3";
|
2022-08-12 12:06:08 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pytest-dev";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-oq28wJ/Tq4yuQ/98tdzYKDyatpliS0Xcbc6T46ZTP7I=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"testout"
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
buildInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
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;
|
|
|
|
passthru.tests.pytest = callPackage ./tests.nix {};
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2022-01-13 20:06:32 +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";
|
2022-09-14 18:05:37 +00:00
|
|
|
changelog = "https://github.com/pytest-dev/pytest-asyncio/blob/v${version}/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
|
|
|
};
|
|
|
|
}
|