python312Packages.aiosasl: fix broken tests on Python 3.12

https://github.com/horazont/aiosasl/issues/28
This commit is contained in:
Fabian Affolter
2024-05-23 11:53:38 +02:00
parent 540bf3b6f8
commit f1dfd96632
@@ -5,13 +5,16 @@
fetchpatch,
pyopenssl,
pytestCheckHook,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "aiosasl";
version = "0.5.0";
pyproject = true;
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "horazont";
@@ -28,6 +31,14 @@ buildPythonPackage rec {
})
];
postPatch = ''
# https://github.com/horazont/aiosasl/issues/28
substituteInPlace tests/test_aiosasl.py \
--replace-fail "assertRaisesRegexp" "assertRaisesRegex"
'';
build-system = [ setuptools ];
nativeCheckInputs = [
pyopenssl
pytestCheckHook