567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
43 lines
1.0 KiB
Nix
43 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchPypi,
|
|
pythonOlder,
|
|
python,
|
|
pythonAtLeast,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "asynctest";
|
|
version = "0.13.0";
|
|
format = "setuptools";
|
|
|
|
# Unmaintained and incompatible python 3.11
|
|
disabled = pythonAtLeast "3.11";
|
|
|
|
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"
|
|
'';
|
|
|
|
# https://github.com/Martiusweb/asynctest/issues/132
|
|
doCheck = pythonOlder "3.7";
|
|
|
|
checkPhase = ''
|
|
${python.interpreter} -m unittest test
|
|
'';
|
|
|
|
meta = {
|
|
description = "Enhance the standard unittest package with features for testing asyncio libraries";
|
|
homepage = "https://github.com/Martiusweb/asynctest";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
};
|
|
}
|