summaryrefslogtreecommitdiff
path: root/python/subunit/tests
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2008-12-08 12:59:41 +1100
committerRobert Collins <robertc@robertcollins.net>2008-12-08 12:59:41 +1100
commit2c1f561d6466270f2d0f5d9064c3f3a16ea3110c (patch)
tree6cf2e470b682226ce0f822a8018f1aec2a06309b /python/subunit/tests
parent18c5bd4f9736990c5e4c7173a1c39a49faa3f99d (diff)
downloadsubunit-git-2c1f561d6466270f2d0f5d9064c3f3a16ea3110c.tar.gz
Swallow time: commands when seen.
Diffstat (limited to 'python/subunit/tests')
-rw-r--r--python/subunit/tests/test_test_protocol.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/python/subunit/tests/test_test_protocol.py b/python/subunit/tests/test_test_protocol.py
index 9088819..a041aa0 100644
--- a/python/subunit/tests/test_test_protocol.py
+++ b/python/subunit/tests/test_test_protocol.py
@@ -22,6 +22,7 @@ from StringIO import StringIO
import os
import subunit
import sys
+import time
try:
class MockTestProtocolServerClient(object):
@@ -747,6 +748,20 @@ class TestTestProtocolServerStreamTags(unittest.TestCase):
self.assertEqual(set(["foo", "bar"]), self.protocol.tags)
+class TestTestProtocolServerStreamTime(unittest.TestCase):
+ """Test managing time information at the protocol level."""
+
+ def setUp(self):
+ self.client = MockTestProtocolServerClient()
+ self.stream = StringIO()
+ self.protocol = subunit.TestProtocolServer(self.client,
+ stream=self.stream)
+
+ def test_time_accepted(self):
+ self.protocol.lineReceived("time: 2001-12-12 12:59:59Z\n")
+ self.assertEqual("", self.stream.getvalue())
+
+
class TestRemotedTestCase(unittest.TestCase):
def test_simple(self):