summaryrefslogtreecommitdiff
path: root/python/subunit/tests/test_test_protocol.py
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2013-08-24 08:58:54 +1200
committerRobert Collins <robertc@robertcollins.net>2013-08-24 08:58:54 +1200
commit92cc88ec140238158e0b56898ef665ea68b55e56 (patch)
treedcc1b2af5ecbbe8d20f836e082cb18d1e4e01920 /python/subunit/tests/test_test_protocol.py
parent81c12d1aadb8b98870a5cfe024cf51ae2f5c0ab9 (diff)
downloadsubunit-92cc88ec140238158e0b56898ef665ea68b55e56.tar.gz
* TestTestProtocols' test_tags_both was set sort order dependent.
(Robert Collins, #1025392)
Diffstat (limited to 'python/subunit/tests/test_test_protocol.py')
-rw-r--r--python/subunit/tests/test_test_protocol.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/python/subunit/tests/test_test_protocol.py b/python/subunit/tests/test_test_protocol.py
index dc2c318..9bdf388 100644
--- a/python/subunit/tests/test_test_protocol.py
+++ b/python/subunit/tests/test_test_protocol.py
@@ -34,6 +34,7 @@ except ImportError:
Python27TestResult,
ExtendedTestResult,
)
+from testtools.matchers import Contains
import subunit
from subunit import _remote_exception_str, _remote_exception_str_chunked
@@ -1128,9 +1129,10 @@ class TestIsolatedTestSuite(TestCase):
self.assertEqual(self.SampleTestToIsolate.TEST, False)
-class TestTestProtocolClient(unittest.TestCase):
+class TestTestProtocolClient(TestCase):
def setUp(self):
+ super(TestTestProtocolClient, self).setUp()
self.io = BytesIO()
self.protocol = subunit.TestProtocolClient(self.io)
self.unicode_test = PlaceHolder(_u('\u2603'))
@@ -1324,7 +1326,9 @@ class TestTestProtocolClient(unittest.TestCase):
def test_tags_both(self):
self.protocol.tags(set(['quux']), set(['bar']))
- self.assertEqual(_b("tags: quux -bar\n"), self.io.getvalue())
+ self.assertThat(
+ [b"tags: quux -bar\n", b"tags: -bar quux\n"],
+ Contains(self.io.getvalue()))
def test_tags_gone(self):
self.protocol.tags(set(), set(['bar']))