Fix test for :debug-log-level with invalid level
Since we're getting dictionary keys in choices=..., we need to sort them so we get a consistent message.
This commit is contained in:
parent
37758131f5
commit
75c3b1a9f8
@ -259,8 +259,9 @@ def window_only(current_win_id):
|
||||
|
||||
|
||||
@cmdutils.register(debug=True)
|
||||
@cmdutils.argument('level', choices=[level.lower()
|
||||
for level in log.LOG_LEVELS])
|
||||
@cmdutils.argument('level', choices=sorted(
|
||||
(level.lower() for level in log.LOG_LEVELS),
|
||||
key=lambda e: log.LOG_LEVELS[e.upper()]))
|
||||
def debug_log_level(level: str):
|
||||
"""Change the log level for console logging.
|
||||
|
||||
|
@ -610,4 +610,4 @@ Feature: Various utility commands.
|
||||
|
||||
Scenario: Using debug-log-level with invalid level
|
||||
When I run :debug-log-level hello
|
||||
Then the error "Invalid value hello - expected one of: debug, error, vdebug, info, warning, critical" should be shown
|
||||
Then the error "level: Invalid value hello - expected one of: vdebug, debug, info, warning, error, critical" should be shown
|
||||
|
Loading…
Reference in New Issue
Block a user