From a3d37f17b78a62ca3e7486de1b40df84b49dbf23 Mon Sep 17 00:00:00 2001 From: Blueve <672454911@qq.com> Date: Sun, 25 Apr 2021 12:08:00 +0800 Subject: [PATCH] [console] Display success message after line cleared (#1579) * [console] Display success message after line cleared Signed-off-by: Jing Kan jika@microsoft.com --- consutil/main.py | 2 ++ tests/console_test.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/consutil/main.py b/consutil/main.py index 069f6bb27e46..9fc41cded527 100644 --- a/consutil/main.py +++ b/consutil/main.py @@ -74,6 +74,8 @@ def clear(db, target, devicename): if not target_port.clear_session(): click.echo("No process is connected to line " + target_port.line_num) + else: + click.echo("Cleared line") # 'connect' subcommand @consutil.command() diff --git a/tests/console_test.py b/tests/console_test.py index e4b5156837df..3df59adbdfd0 100644 --- a/tests/console_test.py +++ b/tests/console_test.py @@ -698,4 +698,4 @@ def test_clear_success(self): print(result.exit_code) print(sys.stderr, result.output) assert result.exit_code == 0 - assert result.output == "" + assert "Cleared line" in result.output