File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,8 @@ def __init__(
189189 self ._whitespace_matcher = _re .compile (r'\s+' , _re .ASCII )
190190 self ._long_break_matcher = _re .compile (r'\n\n\n+' )
191191
192+ self ._set_color (False )
193+
192194 def _set_color (self , color ):
193195 from _colorize import can_colorize , decolor , get_theme
194196
Original file line number Diff line number Diff line change @@ -5694,6 +5694,11 @@ def custom_formatter(prog):
56945694 a-very-long-command command that does something
56955695 ''' ))
56965696
5697+ def test_direct_formatter_instantiation (self ):
5698+ formatter = argparse .HelpFormatter (prog = "program" )
5699+ formatter .add_usage (usage = None , actions = [], groups = [])
5700+ help_text = formatter .format_help ()
5701+ self .assertEqual (help_text , "usage: program\n " )
56975702
56985703# =====================================
56995704# Optional/Positional constructor tests
You can’t perform that action at this time.
0 commit comments