Skip to content

Commit

Permalink
python310Packages.pyasynchat: fix tests (#378792)
Browse files Browse the repository at this point in the history
  • Loading branch information
vcunat committed Feb 5, 2025
2 parents 37f980f + f1319f5 commit 01de9eb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkgs/development/python-modules/pyasynchat/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
setuptools,
pyasyncore,
pytestCheckHook,
pythonOlder,
}:

buildPythonPackage rec {
Expand All @@ -29,6 +30,17 @@ buildPythonPackage rec {

nativeCheckInputs = [ pytestCheckHook ];

preCheck =
if (pythonOlder "3.11") then
''
substituteInPlace tests/test_asynchat.py \
--replace-fail "asynchat = warnings_helper.import_deprecated('asynchat')" 'import asynchat' \
--replace-fail "asyncore = warnings_helper.import_deprecated('asyncore')" 'import asyncore' \
--replace-fail 'support.requires_working_socket(module=True)' ""
''
else
null;

pythonImportsCheck = [
"asynchat"
];
Expand Down

0 comments on commit 01de9eb

Please sign in to comment.