From 928cec1a4ed416d4a2d1c0e784c0213eaf408872 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 1 Mar 2021 10:05:23 +0100 Subject: [PATCH] python3Packages.pytest-httpx: enable tests --- .../python-modules/pytest-httpx/default.nix | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/pytest-httpx/default.nix b/pkgs/development/python-modules/pytest-httpx/default.nix index c74afe7416de..508b7b7781be 100644 --- a/pkgs/development/python-modules/pytest-httpx/default.nix +++ b/pkgs/development/python-modules/pytest-httpx/default.nix @@ -1,20 +1,33 @@ -{ lib, buildPythonPackage, fetchPypi, httpx, pytest }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, httpx +, pytest +, pytest-asyncio +, pytestCheckHook +}: buildPythonPackage rec { pname = "pytest-httpx"; version = "0.11.0"; - src = fetchPypi { - inherit version; - pname = "pytest_httpx"; - extension = "tar.gz"; - sha256 = "sha256-koyrYudZfWRYeK4nP9SLGvEd0xlf017FyZ2FN8CV0Ys="; + src = fetchFromGitHub { + owner = "Colin-b"; + repo = "pytest_httpx"; + rev = "v${version}"; + sha256 = "08idd3y6khxjqkn46diqvkjvsl4w4pxhl6z1hspbkrj0pqwf9isi"; }; - propagatedBuildInputs = [ httpx pytest ]; + propagatedBuildInputs = [ + httpx + pytest + ]; + + checkInputs = [ + pytest-asyncio + pytestCheckHook + ]; - # not in pypi tarball - doCheck = false; pythonImportsCheck = [ "pytest_httpx" ]; meta = with lib; {