Skip to content

Commit 4a1f329

Browse files
author
Veranika Saltanava
committed
fix: adjust test to handle breaking change of stdout and stderr behaviour in click 8.2.0
1 parent ef9e25c commit 4a1f329

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/cli/test_registry_command.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
1+
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
22
# SPDX-License-Identifier: Apache-2.0
3+
import sys
34

45
import requests_mock
56

@@ -144,7 +145,10 @@ def test_logout_from_registry_revoked_token(monkeypatch, tmp_path, invoke_cli):
144145
output = invoke_cli('registry', 'logout', env={'IDF_TOOLS_PATH': str(tmp_path)})
145146

146147
assert 'Successfully logged out' in output.stdout
147-
assert 'Failed to revoke token from the registry' in output.stdout
148+
if sys.version_info < (3, 10):
149+
assert 'Failed to revoke token from the registry' in output.stdout
150+
else:
151+
assert 'Failed to revoke token from the registry' in output.stderr
148152

149153

150154
def test_logout_from_registry_no_revoke(monkeypatch, tmp_path, invoke_cli):

0 commit comments

Comments
 (0)