diff --git a/pkgs/development/python-modules/pytest-celery/default.nix b/pkgs/development/python-modules/pytest-celery/default.nix new file mode 100644 index 00000000000..e3d463a39aa --- /dev/null +++ b/pkgs/development/python-modules/pytest-celery/default.nix @@ -0,0 +1,21 @@ +{ stdenv, buildPythonPackage, fetchPypi, pytest, setuptools_scm }: + +buildPythonPackage rec { + pname = "pytest-celery"; + version = "0.0.0a1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0qifwi7q8dfwbzz2vm5m40lw23qh2fzibngbmw6qgwnkq8bhh3iy"; + }; + + patches = [ ./no-celery.patch ]; + + doCheck = false; # This package has nothing to test or import. + + meta = with stdenv.lib; { + description = "pytest plugin for unittest subTest() support and subtests fixture"; + homepage = "https://github.com/pytest-dev/pytest-subtests"; + license = licenses.mit; + }; +} diff --git a/pkgs/development/python-modules/pytest-celery/no-celery.patch b/pkgs/development/python-modules/pytest-celery/no-celery.patch new file mode 100644 index 00000000000..65337489883 --- /dev/null +++ b/pkgs/development/python-modules/pytest-celery/no-celery.patch @@ -0,0 +1,9 @@ +This plugin is needed to test celery itself, so it can't depend on celery. + +--- a/setup.py ++++ b/setup.py +@@ -6,3 +6,3 @@ from distutils.core import setup + install_requires = \ +-['celery >= 4.4.0'] ++[] + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a4c01e2b313..1cc35759880 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5708,6 +5708,8 @@ in { pytest-catchlog = callPackage ../development/python-modules/pytest-catchlog { }; + pytest-celery = callPackage ../development/python-modules/pytest-celery { }; + pytest-check = callPackage ../development/python-modules/pytest-check { }; pytest-click = callPackage ../development/python-modules/pytest-click { };