From 58804e14462ba18fc9b267b26406f4bcc3c968be Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 27 Jul 2021 14:23:35 +0200 Subject: python3Packages.aioesphomeapi: enable tests --- .../python-modules/aioesphomeapi/default.nix | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'pkgs/development/python-modules/aioesphomeapi/default.nix') diff --git a/pkgs/development/python-modules/aioesphomeapi/default.nix b/pkgs/development/python-modules/aioesphomeapi/default.nix index 6ee09d5114f..b9ee3af9ed8 100644 --- a/pkgs/development/python-modules/aioesphomeapi/default.nix +++ b/pkgs/development/python-modules/aioesphomeapi/default.nix @@ -1,8 +1,11 @@ { lib , buildPythonPackage -, pythonOlder -, fetchPypi +, fetchFromGitHub +, mock , protobuf +, pytest-asyncio +, pytestCheckHook +, pythonOlder , zeroconf }: @@ -13,9 +16,11 @@ buildPythonPackage rec { disabled = pythonOlder "3.7"; - src = fetchPypi { - inherit pname version; - sha256 = "04r97d8bc5amvjvf2sxy2h4jf6z348q6p5z1nsxfnif80kxl0k60"; + src = fetchFromGitHub { + owner = "esphome"; + repo = pname; + rev = "v${version}"; + sha256 = "09hhkwkphyqa31yd1mmpz8xmyz6hav8vwf36v8xc4v6g1xm9l6f5"; }; propagatedBuildInputs = [ @@ -23,8 +28,11 @@ buildPythonPackage rec { zeroconf ]; - # no tests implemented - doCheck = false; + checkInputs = [ + mock + pytest-asyncio + pytestCheckHook + ]; pythonImportsCheck = [ "aioesphomeapi" -- cgit 1.4.1