Skip to content

Commit

Permalink
refactor: Reduce duplication in verbose_reports test.
Browse files Browse the repository at this point in the history
  • Loading branch information
adambirds committed May 2, 2021
1 parent 6bb8ce0 commit bf57258
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/test_xkcd_pass_verbose_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down

0 comments on commit bf57258

Please sign in to comment.