From ad2002c19cad65be60dd1eb6ad13589156885365 Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Mon, 22 Jul 2019 12:35:03 +0200 Subject: [PATCH 1/2] assert output is empty --- test/test_main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/test_main.py b/test/test_main.py index 5d03b6a9c35..c227984e92b 100644 --- a/test/test_main.py +++ b/test/test_main.py @@ -33,11 +33,14 @@ def test_command_help(): def test_command_lib_list(): + """ + When ouput is empty, nothing is printed out, no matter the output format + """ result = run_command('lib list') assert result.ok assert result.stderr == '' result = run_command('lib list', '--format json') - assert '{}' == result.stdout + assert '' == result.stdout def test_command_lib_install(): From 450a55c903b3ca5b621f70214b116218114b1da2 Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Mon, 22 Jul 2019 16:28:49 +0200 Subject: [PATCH 2/2] be consistent in style --- test/test_main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_main.py b/test/test_main.py index c227984e92b..839c774592e 100644 --- a/test/test_main.py +++ b/test/test_main.py @@ -38,7 +38,7 @@ def test_command_lib_list(): """ result = run_command('lib list') assert result.ok - assert result.stderr == '' + assert '' == result.stderr result = run_command('lib list', '--format json') assert '' == result.stdout