mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-30 16:10:36 +00:00
python3Packages.pytest-asyncio: enable tests
This commit is contained in:
committed by
Jonathan Ringer
parent
6f3e842204
commit
c1bdf9b7b5
@@ -1,29 +1,43 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, pytest, isPy3k, isPy35, async_generator }:
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, hypothesis
|
||||
, pytest
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytest-asyncio";
|
||||
version = "0.16.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = !isPy3k;
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "7496c5977ce88c34379df64a66459fe395cd05543f0a2f837016e7144391fcfb";
|
||||
src = fetchFromGitHub {
|
||||
owner = "pytest-dev";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-4zMbzdDtiLRKo5C12wZRoBNguXLn3f26NuDwQ+pHA0I=";
|
||||
};
|
||||
|
||||
buildInputs = [ pytest ]
|
||||
++ lib.optionals isPy35 [ async_generator ];
|
||||
buildInputs = [
|
||||
pytest
|
||||
];
|
||||
|
||||
# No tests in archive
|
||||
doCheck = false;
|
||||
checkInputs = [
|
||||
hypothesis
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
# LICENSE file is not distributed. https://github.com/pytest-dev/pytest-asyncio/issues/92
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg --replace "license_file = LICENSE" ""
|
||||
'';
|
||||
pythonImportsCheck = [
|
||||
"pytest_asyncio"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "library for testing asyncio code with pytest";
|
||||
license = licenses.asl20;
|
||||
homepage = "https://github.com/pytest-dev/pytest-asyncio";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user