python312Packages.antlr4-python3-runtime: fix tests

This commit is contained in:
Martin Weinelt 2023-12-09 21:52:53 +01:00
parent 5501979bba
commit d32dd3fe56
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -19,12 +19,22 @@ buildPythonPackage rec {
setuptools setuptools
]; ];
postPatch = ''
substituteInPlace tests/TestIntervalSet.py \
--replace "assertEquals" "assertEqual"
'';
# We use an asterisk because this expression is used also for old antlr # We use an asterisk because this expression is used also for old antlr
# versions, where there the tests directory is `test` and not `tests`. # versions, where there the tests directory is `test` and not `tests`.
# See e.g in package `baserow`. # See e.g in package `baserow`.
checkPhase = '' checkPhase = ''
cd test* runHook preCheck
pushd tests
${python.interpreter} run.py ${python.interpreter} run.py
popd
runHook postCheck
''; '';
meta = with lib; { meta = with lib; {