From 69d01232c57af55983191f302d4f2053facdcea1 Mon Sep 17 00:00:00 2001 From: Adam Dinwoodie Date: Mon, 3 Aug 2026 15:43:27 +0100 Subject: [PATCH] python3Packages.typed-argparse: skip broken tests Fixes #548842 (cherry picked from commit 1dddec2571b7ab9f03d63a31c29e5ddef9a7526a) --- .../python-modules/typed-argparse/default.nix | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/typed-argparse/default.nix b/pkgs/development/python-modules/typed-argparse/default.nix index 3f042cb8ea89..5b3fe21438fe 100644 --- a/pkgs/development/python-modules/typed-argparse/default.nix +++ b/pkgs/development/python-modules/typed-argparse/default.nix @@ -30,13 +30,27 @@ buildPythonPackage { pytest-cov-stub ]; + # The test suite checks for exact output in a way that seems fragile to + # cosmetic changes in Python's argparse output, and means some tests fail on + # more recent releases. Disable the affected tests while we're waiting for + # upstream fixes. + # # https://github.com/typed-argparse/typed-argparse/pull/82 - disabledTests = lib.optionals (pythonAtLeast "3.14") [ - "test_nargs_with_choices__literal_illegal_default" - "test_nargs_with_choices__enum_illegal_default" - "test_bindings_check" - "test_check_reserved_names" - ]; + # https://github.com/typed-argparse/typed-argparse/issues/84 + disabledTests = + lib.optionals (pythonAtLeast "3.14") [ + "test_nargs_with_choices__literal_illegal_default" + "test_nargs_with_choices__enum_illegal_default" + "test_bindings_check" + "test_check_reserved_names" + ] + ++ lib.optionals (pythonAtLeast "3.13") [ + "test_dynamic_choices" + "test_literal__basics" + "test_enum__basics[False]" + "test_enum__basics[True]" + "test_subparsers_common_args__subparser_after_positional" + ]; pythonImportsCheck = [ "typed_argparse" ];