From e7f431e7dda4212d3aad5b6243ce647bbca65b27 Mon Sep 17 00:00:00 2001 From: markshao Date: Sat, 24 Dec 2022 15:22:18 +0800 Subject: [PATCH] Revert "fix the error when mix-use the cache-show and help option" This reverts commit d044e9f642edd5bea5bac16c1952cb365e6ded34. --- src/_pytest/config/__init__.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index b997e47d9..25f156f8b 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -1074,12 +1074,6 @@ class Config: ) raise - except PrintHelp: - self._parser._getparser().print_help() - sys.stdout.write( - "\nNOTE: displaying only minimal help due to UsageError.\n\n" - ) - raise UsageError return self @@ -1374,7 +1368,7 @@ class Config: self.args = args self.args_source = source except PrintHelp: - raise + pass def issue_config_time_warning(self, warning: Warning, stacklevel: int) -> None: """Issue and handle a warning during the "configure" stage.