about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/antlr4-python3-runtime/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/antlr4-python3-runtime/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/antlr4-python3-runtime/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/antlr4-python3-runtime/default.nix b/nixpkgs/pkgs/development/python-modules/antlr4-python3-runtime/default.nix
index 20daf71c8cda..3b8ed13b1ad8 100644
--- a/nixpkgs/pkgs/development/python-modules/antlr4-python3-runtime/default.nix
+++ b/nixpkgs/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; {