Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/test_cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,17 @@ def test_lazy_choices():


def test_lazy_choices_help():
import sys
mock = Mock()
getter = mock.getter
getter.return_value = ['a', 'b', 'c']

# Python 3.14+ calls getter during argparse initialisation
if sys.version_info >= (3, 14):
from unittest.mock import ANY
getter.assert_called()
getter.reset_mock()

help_formatter = mock.help_formatter
help_formatter.return_value = '<my help>'

Expand Down
Loading