feat(tools): Replaced click with rich_click

This commit is contained in:
Marek Fiala
2026-06-01 20:07:27 +08:00
committed by BOT
parent 2e2909506f
commit eb91e45092
15 changed files with 115 additions and 91 deletions
+22
View File
@@ -33,6 +33,28 @@ py_actions_path = os.path.normpath(os.path.join(current_dir, '..', 'idf_py_actio
link_path = os.path.join(py_actions_path, 'test_ext')
# As idf.py uses rich-click, unite modification variables to ensure constant results on various CI terminals
_idf_py_test_env_saved: dict[str, str | None] = {}
def setUpModule() -> None:
for key in ('COLUMNS', 'LINES', 'NO_COLOR', 'FORCE_COLOR', 'PY_COLORS', 'TERM'):
_idf_py_test_env_saved[key] = os.environ.get(key)
os.environ['COLUMNS'] = '200'
os.environ['LINES'] = '40'
os.environ['NO_COLOR'] = '1'
for unset in ('FORCE_COLOR', 'PY_COLORS'):
os.environ.pop(unset, None)
def tearDownModule() -> None:
for key, previous in _idf_py_test_env_saved.items():
if previous is None:
os.environ.pop(key, None)
else:
os.environ[key] = previous
class TestWithoutExtensions(TestCase):
@classmethod
def setUpClass(cls):