python3Packages.python-dotenv: switch to pytestCheckHook

This commit is contained in:
Fabian Affolter 2021-02-28 18:11:30 +01:00
parent 7b6687a210
commit 21dd525bc9
1 changed files with 19 additions and 10 deletions
pkgs/development/python-modules/python-dotenv

View File

@ -1,29 +1,38 @@
{ lib, buildPythonPackage, fetchPypi, isPy27 { lib
, buildPythonPackage
, click , click
, fetchPypi
, ipython , ipython
, pytest
, sh
, typing
, mock , mock
, pytestCheckHook
, pythonOlder
, sh
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "python-dotenv"; pname = "python-dotenv";
version = "0.15.0"; version = "0.15.0";
disabled = pythonOlder "3.5";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "587825ed60b1711daea4832cf37524dfd404325b7db5e25ebe88c495c9f807a0"; sha256 = "587825ed60b1711daea4832cf37524dfd404325b7db5e25ebe88c495c9f807a0";
}; };
propagatedBuildInputs = [ click ] ++ lib.optionals isPy27 [ typing ]; propagatedBuildInputs = [ click ];
checkInputs = [ ipython mock pytest sh ]; checkInputs = [
ipython
mock
pytestCheckHook
sh
];
# cli tests are impure disabledTests = [
checkPhase = '' "cli"
pytest tests/ -k 'not cli' ];
'';
pythonImportsCheck = [ "dotenv" ];
meta = with lib; { meta = with lib; {
description = "Add .env support to your django/flask apps in development and deployments"; description = "Add .env support to your django/flask apps in development and deployments";