From bf5725830a7151dace793325caf165004c97dc3b Mon Sep 17 00:00:00 2001 From: Adam Birds Date: Sun, 2 May 2021 02:22:18 +0100 Subject: [PATCH] refactor: Reduce duplication in verbose_reports test. --- tests/test_xkcd_pass_verbose_reports.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_xkcd_pass_verbose_reports.py b/tests/test_xkcd_pass_verbose_reports.py index e48690e..23cc23b 100644 --- a/tests/test_xkcd_pass_verbose_reports.py +++ b/tests/test_xkcd_pass_verbose_reports.py @@ -27,7 +27,7 @@ def setUp(self) -> None: self.options = argparse.Namespace( numwords=6, - verbose=None, + verbose=True, ) self.stdout_patcher = mock.patch.object(sys, "stdout", new_callable=io.StringIO) @@ -36,7 +36,6 @@ def test_verbose_output(self) -> None: """ Should display verbose reporting. """ - self.options.verbose = True with self.stdout_patcher as mock_stdout: xkcd_pass.verbose_reports(wordlist=self.wordlist_small, options=self.options) output = mock_stdout.getvalue()