summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorThomi Richards <thomi.richards@canonical.com>2013-12-10 11:10:57 +1300
committerThomi Richards <thomi.richards@canonical.com>2013-12-10 11:10:57 +1300
commitda6c0076527849d6e720a5cfc5ed7544650f58f6 (patch)
tree310a0661382d0fb866a0b628f5929a9bfe1f216c /python
parent4a4f7ffda0a72a2735008029022cb92f737407b3 (diff)
downloadsubunit-git-da6c0076527849d6e720a5cfc5ed7544650f58f6.tar.gz
Make tests work in py2 and py3.
Diffstat (limited to 'python')
-rw-r--r--python/subunit/tests/test_output_filter.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/subunit/tests/test_output_filter.py b/python/subunit/tests/test_output_filter.py
index 4099023..40bec89 100644
--- a/python/subunit/tests/test_output_filter.py
+++ b/python/subunit/tests/test_output_filter.py
@@ -166,9 +166,13 @@ class ArgParserTests(TestCase):
def test_must_specify_tags_with_tags_options(self):
fn = lambda: safe_parse_arguments(['--fail', 'foo', '--tag'])
+ if sys.version[0] >= '3':
+ expected_message = '--tag option requires 1 argument'
+ else:
+ expected_message = '--tag option requires an argument'
self.assertThat(
fn,
- raises(RuntimeError('--tag option requires 1 argument'))
+ raises(RuntimeError(expected_message))
)