From b163a8316fdbbe3e41e59744efa363473dfc2fa5 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 4 Dec 2023 18:00:14 +0100 Subject: [PATCH] python312Packages.pyu2f: patch test compatibility --- .../python-modules/pyu2f/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pkgs/development/python-modules/pyu2f/default.nix b/pkgs/development/python-modules/pyu2f/default.nix index 609d8bfcebae..ef09f1285183 100644 --- a/pkgs/development/python-modules/pyu2f/default.nix +++ b/pkgs/development/python-modules/pyu2f/default.nix @@ -24,6 +24,24 @@ buildPythonPackage rec { six ]; + postPatch = '' + for path in \ + customauthenticator_test.py \ + hardware_test.py \ + hidtransport_test.py \ + localauthenticator_test.py \ + model_test.py \ + u2f_test.py \ + util_test.py \ + hid/macos_test.py; \ + do + # https://docs.python.org/3/whatsnew/3.12.html#id3 + substituteInPlace pyu2f/tests/$path \ + --replace "assertEquals" "assertEqual" \ + --replace "assertRaisesRegexp" "assertRaisesRegex" + done + ''; + nativeCheckInputs = [ mock pyfakefs