From 02598b4273a53258f44774cb13a806db50072b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 12 Aug 2024 04:27:38 -0700 Subject: [PATCH] python312Packages.pyblu: run tests --- .../python-modules/pyblu/default.nix | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pyblu/default.nix b/pkgs/development/python-modules/pyblu/default.nix index 14b6c1d10de6..0060bc176438 100644 --- a/pkgs/development/python-modules/pyblu/default.nix +++ b/pkgs/development/python-modules/pyblu/default.nix @@ -1,9 +1,12 @@ { aiohttp, + aioresponses, buildPythonPackage, - fetchPypi, + fetchFromGitHub, lib, poetry-core, + pytest-asyncio, + pytestCheckHook, xmltodict, }: @@ -12,9 +15,11 @@ buildPythonPackage rec { version = "0.4.0"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-qMbwrRD7ZUsHHOLF9yPvAxiTmJ8vJX1cyHX+4ONtsQ8="; + src = fetchFromGitHub { + owner = "LouisChrist"; + repo = "pyblu"; + rev = "refs/tags/v${version}"; + hash = "sha256-Pj0L9D5j+5koqhbpr4maa8aLGka1FghKkMEbyKi/D3E="; }; build-system = [ poetry-core ]; @@ -26,9 +31,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "pyblu" ]; - # no tests on PyPI, no tags on GitHub - # https://github.com/LouisChrist/pyblu/issues/19 - doCheck = false; + nativeCheckInputs = [ + aioresponses + pytest-asyncio + pytestCheckHook + ]; meta = { description = "BluOS API client";