passing a pipe to the protocol works
authorRobert Collins <robertc@robertcollins.net>
Sat, 27 Aug 2005 23:57:33 +0000 (09:57 +1000)
committerRobert Collins <robertc@robertcollins.net>
Sat, 27 Aug 2005 23:57:33 +0000 (09:57 +1000)
lib/subunit/tests/test_test_protocol.py

index 6157c58e3132bcb7ad80ad94d2030e005a250f2e..3d8a04e1a1d8d496f94c9fd0bf9019c50239fd24 100644 (file)
@@ -102,7 +102,7 @@ class TestTestImports(unittest.TestCase):
 
 class TestTestProtocolServerPipe(unittest.TestCase):
 
-    def skip_test_story(self):
+    def test_story(self):
         protocol = MockTestProtocolServer()
         pipe = StringIO("test old mcdonald\n"
                         "success old mcdonald\n"
@@ -117,10 +117,12 @@ class TestTestProtocolServerPipe(unittest.TestCase):
         bing = subunit.RemotedTestCase("bing crosby")
         an_error = subunit.RemotedTestCase("an error")
         self.assertEqual(protocol.start_calls, [mcdonald, bing, an_error])
-        self.assertEqual(protocol.error_calls, [(an_error, RemoteError())])
-        self.assertEqual(protocol.failure_calls, [
-                            (bing,
-                             RemoteError("foo.c:53:ERROR invalid state\n"))])
+        self.assertEqual(protocol.error_calls, 
+                         [(an_error, subunit.RemoteError())])
+        self.assertEqual(protocol.failure_calls, 
+                         [(bing,
+                           subunit.RemoteError("foo.c:53:ERROR "
+                                               "invalid state\n"))])
         self.assertEqual(protocol.success_calls, [mcdonald])