Fix failing test on py33.
authorThomi Richards <thomi.richards@canonical.com>
Sun, 12 Jan 2014 22:10:11 +0000 (11:10 +1300)
committerThomi Richards <thomi.richards@canonical.com>
Sun, 12 Jan 2014 22:10:11 +0000 (11:10 +1300)
python/subunit/tests/test_output_filter.py

index 7b11d4da2ab42681a9310727839463608ac1211a..cba9332d2dd6011bac516e73f48be478823ae9de 100644 (file)
@@ -166,16 +166,14 @@ 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.2':
-            expected_message = '--tag option requires 1 argument'
-        else:
-            expected_message = '--tag option requires an argument'
         self.assertThat(
             fn,
-            raises(RuntimeError(expected_message))
+            MatchesAny(
+                raises(RuntimeError('--tag option requires 1 argument')),
+                raises(RuntimeError('--tag option requires an argument')),
+            )
         )
 
-
 def get_result_for(commands):
     """Get a result object from *commands.