Skip to content

Commit

Permalink
Reduce stderr noise when running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mhl committed Sep 8, 2016
1 parent e083394 commit 3a54fa2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion popolo/tests/test_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,12 @@ def test_truncation_exception(self):
with self.assertRaisesRegexp(
ValidationError,
'Ensure this value has at most 512 characters'):
importer.import_from_export_json_data(data)
# Capture the output just to reduce noise in the test
# output - this would include output from
# show_data_on_error otherwise.
with capture_output() as (out, err):
importer.import_from_export_json_data(data)


def test_truncation_warn(self):
long_name = ('Albert ' * 100).strip()
Expand Down

0 comments on commit 3a54fa2

Please sign in to comment.