From d32dd3fe5651b5a9cd31a68c5725071394016837 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 9 Dec 2023 21:52:53 +0100 Subject: [PATCH] python312Packages.antlr4-python3-runtime: fix tests --- .../antlr4-python3-runtime/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/antlr4-python3-runtime/default.nix b/pkgs/development/python-modules/antlr4-python3-runtime/default.nix index 20daf71c8cda..3b8ed13b1ad8 100644 --- a/pkgs/development/python-modules/antlr4-python3-runtime/default.nix +++ b/pkgs/development/python-modules/antlr4-python3-runtime/default.nix @@ -19,12 +19,22 @@ buildPythonPackage rec { setuptools ]; + postPatch = '' + substituteInPlace tests/TestIntervalSet.py \ + --replace "assertEquals" "assertEqual" + ''; + # We use an asterisk because this expression is used also for old antlr # versions, where there the tests directory is `test` and not `tests`. # See e.g in package `baserow`. checkPhase = '' - cd test* + runHook preCheck + + pushd tests ${python.interpreter} run.py + popd + + runHook postCheck ''; meta = with lib; {