From 0473208187e40d2a751c66abec962b370b1bc379 Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Thu, 19 Sep 2024 11:12:59 -0500 Subject: [PATCH] test: fix other tests --- tests/functional/test_logging.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/functional/test_logging.py b/tests/functional/test_logging.py index 9bf53cd768..7747a087a1 100644 --- a/tests/functional/test_logging.py +++ b/tests/functional/test_logging.py @@ -33,6 +33,7 @@ def test_info_level_higher(simple_runner): def cmd(cli_ctx): cli_ctx.logger.info("this is a test") + logger._did_parse_sys_argv = False result = simple_runner.invoke(group_for_testing, ("cmd", "-v", "WARNING")) # You don't get INFO log when log level is higher @@ -57,6 +58,7 @@ def test_warning_level_higher(simple_runner): def cmd(cli_ctx): cli_ctx.logger.warning("this is a test") + logger._did_parse_sys_argv = False result = simple_runner.invoke(group_for_testing, ("cmd", "-v", "ERROR")) assert "WARNING" not in result.output assert "this is a test" not in result.output @@ -71,6 +73,7 @@ def test_success(simple_runner): def cmd(cli_ctx): cli_ctx.logger.success("this is a test") + logger._did_parse_sys_argv = False result = simple_runner.invoke(group_for_testing, "cmd") assert "SUCCESS" in result.output assert "this is a test" in result.output @@ -82,6 +85,7 @@ def test_success_level_higher(simple_runner): def cmd(cli_ctx): cli_ctx.logger.success("this is a test") + logger._did_parse_sys_argv = False result = simple_runner.invoke(group_for_testing, ("cmd", "-v", "WARNING")) assert "SUCCESS" not in result.output assert "this is a test" not in result.output