From 8f8e1e14d846c321f5ec25b4e2899e1f6bd33756 Mon Sep 17 00:00:00 2001 From: joneszc Date: Wed, 23 Oct 2024 09:05:40 -0400 Subject: [PATCH] revert 'add try to assert block to inspect error'(1f392e8) --- tests/tests_unit/test_cli_validate.py | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/tests/tests_unit/test_cli_validate.py b/tests/tests_unit/test_cli_validate.py index 07a931acd..faf2efa8a 100644 --- a/tests/tests_unit/test_cli_validate.py +++ b/tests/tests_unit/test_cli_validate.py @@ -114,26 +114,20 @@ def test_cli_validate_from_env(): ["validate", "--config", tmp_file.resolve()], env={"NEBARI_SECRET__amazon_web_services__kubernetes_version": "1.20"}, ) - try: - assert 0 == valid_result.exit_code - assert not valid_result.exception - assert "Successfully validated configuration" in valid_result.stdout - except AssertionError: - print(valid_result.stdout) - raise + + assert 0 == valid_result.exit_code + assert not valid_result.exception + assert "Successfully validated configuration" in valid_result.stdout invalid_result = runner.invoke( app, ["validate", "--config", tmp_file.resolve()], env={"NEBARI_SECRET__amazon_web_services__kubernetes_version": "1.0"}, ) - try: - assert 1 == invalid_result.exit_code - assert invalid_result.exception - assert "Invalid `kubernetes-version`" in invalid_result.stdout - except AssertionError: - print(invalid_result.stdout) - raise + + assert 1 == invalid_result.exit_code + assert invalid_result.exception + assert "Invalid `kubernetes-version`" in invalid_result.stdout @pytest.mark.parametrize(