2018-02-04 21:13:11 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, fetchFromGitHub, pythonOlder, python }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asynctest";
|
2018-02-27 20:18:19 +00:00
|
|
|
version = "0.12.0";
|
2018-02-04 21:13:11 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.4";
|
|
|
|
|
|
|
|
# PyPI tarball doesn't ship test/__init__.py
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Martiusweb";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2018-02-27 20:18:19 +00:00
|
|
|
sha256 = "0rcb3kz2m0iwvgxpx2avfz9cqsd9xbaq93zykr2fki3ikmnp3vyg";
|
2018-02-04 21:13:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Skip failing test, probably caused by file system access
|
|
|
|
substituteInPlace test/test_selector.py \
|
|
|
|
--replace "test_events_watched_outside_test_are_ignored" "xtest_events_watched_outside_test_are_ignored"
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Enhance the standard unittest package with features for testing asyncio libraries";
|
|
|
|
homepage = https://github.com/Martiusweb/asynctest;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|