diff --git a/pkgs/development/python-modules/bugsnag/default.nix b/pkgs/development/python-modules/bugsnag/default.nix index 8863c76bc48b..afd81e072b27 100644 --- a/pkgs/development/python-modules/bugsnag/default.nix +++ b/pkgs/development/python-modules/bugsnag/default.nix @@ -7,6 +7,7 @@ setuptools, webob, pytestCheckHook, + pytest-cov-stub, }: buildPythonPackage rec { @@ -21,11 +22,6 @@ buildPythonPackage rec { hash = "sha256-WXBdlgUoWdptv1weJf82qyH8TTqNCC1rYFEa972TqDY="; }; - postPatch = '' - substituteInPlace tox.ini --replace-fail \ - "--cov=bugsnag --cov-report html --cov-append --cov-report term" "" - ''; - build-system = [ setuptools ]; dependencies = [ webob ]; @@ -39,7 +35,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "bugsnag" ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + pytest-cov-stub + ]; disabledTestPaths = [ # Extra dependencies diff --git a/pkgs/development/python-modules/openevsewifi/default.nix b/pkgs/development/python-modules/openevsewifi/default.nix index 53934a98d819..48ca148b5563 100644 --- a/pkgs/development/python-modules/openevsewifi/default.nix +++ b/pkgs/development/python-modules/openevsewifi/default.nix @@ -6,6 +6,7 @@ fetchpatch, poetry-core, pytestCheckHook, + pytest-cov-stub, requests, requests-mock, }: @@ -32,6 +33,7 @@ buildPythonPackage rec { nativeCheckInputs = [ requests-mock pytestCheckHook + pytest-cov-stub ]; patches = [ @@ -43,11 +45,6 @@ buildPythonPackage rec { }) ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'pytest-cov = "^2.8.1"' "" - ''; - pythonImportsCheck = [ "openevsewifi" ]; meta = { diff --git a/pkgs/development/python-modules/pyairtable/default.nix b/pkgs/development/python-modules/pyairtable/default.nix index 75a314bb50ed..07c312d832e1 100644 --- a/pkgs/development/python-modules/pyairtable/default.nix +++ b/pkgs/development/python-modules/pyairtable/default.nix @@ -11,7 +11,7 @@ click, pytest, - pytest-cov, + pytest-cov-stub, mock, requests-mock, tox, @@ -42,7 +42,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytest - pytest-cov + pytest-cov-stub mock requests-mock tox diff --git a/pkgs/development/python-modules/returns/default.nix b/pkgs/development/python-modules/returns/default.nix index e0129305e666..d64ace0f1a24 100644 --- a/pkgs/development/python-modules/returns/default.nix +++ b/pkgs/development/python-modules/returns/default.nix @@ -8,6 +8,7 @@ mypy, poetry-core, pytest-aio, + pytest-cov-stub, pytest-mypy, pytest-mypy-plugins, pytestCheckHook, @@ -28,11 +29,6 @@ buildPythonPackage rec { hash = "sha256-VQzsa/uNTQVND0kc20d25to/6LELEiS3cqvG7a1kDw4="; }; - postPatch = '' - sed -i setup.cfg \ - -e '/--cov.*/d' - ''; - nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = [ typing-extensions ]; @@ -45,6 +41,7 @@ buildPythonPackage rec { mypy pytestCheckHook pytest-aio + pytest-cov-stub pytest-mypy pytest-mypy-plugins setuptools diff --git a/pkgs/development/python-modules/static3/default.nix b/pkgs/development/python-modules/static3/default.nix index a834bc313453..45de611df216 100644 --- a/pkgs/development/python-modules/static3/default.nix +++ b/pkgs/development/python-modules/static3/default.nix @@ -8,6 +8,7 @@ # tests pytestCheckHook, + pytest-cov-stub, webtest, }: @@ -23,11 +24,6 @@ buildPythonPackage rec { hash = "sha256-uFgv+57/UZs4KoOdkFxbvTEDQrJbb0iYJ5JoWWN4yFY="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace ", 'pytest-cov'" "" - ''; - optional-dependencies = { KidMagic = [ # TODO: kid @@ -39,6 +35,7 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook + pytest-cov-stub webtest ] ++ lib.concatAttrValues optional-dependencies;