diff options
| author | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-01-18 15:12:51 +0100 |
|---|---|---|
| committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2023-01-19 03:16:22 +0100 |
| commit | 51dadc07646d482ccdcb45452f7de217fead5675 (patch) | |
| tree | d02f2d0fbacc1a4360fa8dcc4c39d5e86a37ca9e /pkgs/development/python-modules/python-miio | |
| parent | a72680c75b07802da6a7ce7785dbb1080bf6c472 (diff) | |
python3Packages.pyhon-miio: Fix tests with pytest 7.2
and clean up obsolete patches.
Diffstat (limited to 'pkgs/development/python-modules/python-miio')
| -rw-r--r-- | pkgs/development/python-modules/python-miio/default.nix | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/python-miio/default.nix b/pkgs/development/python-modules/python-miio/default.nix index 32d5d542c30a..7e76da69c536 100644 --- a/pkgs/development/python-modules/python-miio/default.nix +++ b/pkgs/development/python-modules/python-miio/default.nix @@ -9,10 +9,12 @@ , cryptography , defusedxml , fetchPypi +, fetchpatch , importlib-metadata , micloud , netifaces , poetry-core +, pytest-asyncio , pytest-mock , pytestCheckHook , pythonOlder @@ -39,6 +41,14 @@ buildPythonPackage rec { poetry-core ]; + patches = [ + (fetchpatch { + # Fix pytest 7.2 compat + url = "https://github.com/rytilahti/python-miio/commit/67d9d771d04d51f5bd97f361ca1c15ae4a18c274.patch"; + hash = "sha256-Os9vCSKyieCqHs63oX6gcLrtv1N7hbX5WvEurelEp8w="; + }) + ]; + propagatedBuildInputs = [ android-backup appdirs @@ -59,18 +69,11 @@ buildPythonPackage rec { ]; checkInputs = [ + pytest-asyncio pytest-mock pytestCheckHook ]; - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'defusedxml = "^0"' 'defusedxml = "*"' - # Will be fixed with the next release, https://github.com/rytilahti/python-miio/pull/1378 - substituteInPlace miio/integrations/vacuum/roborock/vacuum_cli.py \ - --replace "resultcallback" "result_callback" - ''; - pythonImportsCheck = [ "miio" ]; |
