python312Packages.py-radix-sr: unstuck

One particular test was getting stuck on Python 3.12, and the others
were failing, since they were using removed test functions.
This commit is contained in:
Martin Weinelt
2024-03-12 18:25:05 +01:00
parent bc60026f18
commit 97fbbdbec8
@@ -2,6 +2,7 @@
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonAtLeast
}:
buildPythonPackage rec {
@@ -19,12 +20,21 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace setup.py \
--replace "name='py-radix'" "name='py-radix-sr'"
substituteInPlace tests/test_{compat,regression}.py \
--replace-fail assertEquals assertEqual \
--replace-warn assertNotEquals assertNotEqual
'';
pythonImportsCheck = [ "radix" ];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = lib.optionals (pythonAtLeast "3.12") [
# test does not complete on 3.12+
"test_000_check_incref"
];
meta = with lib; {
description = "Python radix tree for IPv4 and IPv6 prefix matching";
homepage = "https://github.com/SEKOIA-IO/py-radix";