diff --git a/pkgs/development/python-modules/pytest-asyncio-cooperative/default.nix b/pkgs/development/python-modules/pytest-asyncio-cooperative/default.nix new file mode 100644 index 000000000000..b77d0c6daf98 --- /dev/null +++ b/pkgs/development/python-modules/pytest-asyncio-cooperative/default.nix @@ -0,0 +1,43 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + poetry-core, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "pytest-asyncio-cooperative"; + version = "0.40.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "willemt"; + repo = "pytest-asyncio-cooperative"; + tag = "v${version}"; + hash = "sha256-WA2swhgpn7Ct409tk91gQiHUZCXQLO0eznqskOVlU1U="; + }; + + build-system = [ poetry-core ]; + + nativeCheckInputs = [ pytestCheckHook ]; + disabledTestPaths = [ + "example/hypothesis_test.py" + ]; + disabledTests = [ + "test_tmp_path" + "test_session_scope_gen" + "test_session_scope_async_gen" + "test_retry" + ]; + + pythonImportsCheck = [ "pytest_asyncio_cooperative" ]; + + meta = { + description = "Use asyncio to run your I/O bound test suite efficiently and quickly"; + homepage = "https://github.com/willemt/pytest-asyncio-cooperative"; + changelog = "https://github.com/willemt/pytest-asyncio-cooperative/releases/tag/v${version}"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ jherland ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cc0a20cbed23..7c5689fd56f3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13987,6 +13987,10 @@ self: super: with self; { pytest-asyncio = callPackage ../development/python-modules/pytest-asyncio { }; + pytest-asyncio-cooperative = + callPackage ../development/python-modules/pytest-asyncio-cooperative + { }; + pytest-asyncio_0_21 = pytest-asyncio.overridePythonAttrs (old: rec { version = "0.21.2"; src = pkgs.fetchFromGitHub {