From 8707ba1522e425763b2e4bdcb418c17ef43eac4b Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Thu, 3 May 2018 00:11:44 -0400 Subject: [PATCH 1/2] Added unit test to partially cover cmd2.cmd2.Cmd.ppaged() --- tests/test_cmd2.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index b570ad3c0..a444da2f0 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -1710,3 +1710,11 @@ def test_unalias_non_existing(base_app, capsys): run_cmd(base_app, 'unalias fake') out, err = capsys.readouterr() assert "does not exist" in err + + +def test_ppaged(base_app): + msg = 'testing...' + end = '\n' + base_app.ppaged(msg) + out = base_app.stdout.buffer + assert out == msg + end \ No newline at end of file From 8624a273d4b19b0bb5c8e5b99a6a7688a6bf6f69 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Thu, 3 May 2018 00:14:30 -0400 Subject: [PATCH 2/2] Added newline at end of file --- tests/test_cmd2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index a444da2f0..b6416005c 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -1717,4 +1717,4 @@ def test_ppaged(base_app): end = '\n' base_app.ppaged(msg) out = base_app.stdout.buffer - assert out == msg + end \ No newline at end of file + assert out == msg + end