Skip to content

Commit

Permalink
Reduce stray output from test
Browse files Browse the repository at this point in the history
  • Loading branch information
lucc committed Nov 26, 2023
1 parent 946999c commit 82cfc4b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,11 @@ def test_add_email_multiple_headers_comma_separated(self):
self.assertEqual(["other", "myfield", "from"], actual)

def test_exit_user_friendly_without_config_file(self):
with self.assertRaises(SystemExit):
cli.parse_args(["-c", "/this file should hopefully never exist."])
with mock_stream("stderr") as stderr:
with self.assertRaises(SystemExit):
cli.parse_args(["-c", "/this file should hopefully never exist."])
self.assertTrue(stderr.getvalue().startswith(
"Error reading config file: Config file not found:"))

def test_exit_user_friendly_without_contacts_folder(self):
with tempfile.NamedTemporaryFile("w", delete=False) as config:
Expand Down

0 comments on commit 82cfc4b

Please sign in to comment.