2023-04-12 12:48:02 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, pythonOlder, python, pythonAtLeast }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asynctest";
|
|
|
|
version = "0.13.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
# Unmaintained and incompatible python 3.11
|
|
|
|
disabled = pythonAtLeast "3.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62";
|
|
|
|
};
|
|
|
|
|
|
|
|
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"
|
|
|
|
'';
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
# https://github.com/Martiusweb/asynctest/issues/132
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = pythonOlder "3.7";
|
2020-06-15 15:56:04 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|