Rev 4890: Do the same test using simple pipes in http://bazaar.launchpad.net/~jameinel/bzr/2.1-client-reconnect-819604

John Arbash Meinel john at arbash-meinel.com
Wed Sep 28 15:09:41 UTC 2011


At http://bazaar.launchpad.net/~jameinel/bzr/2.1-client-reconnect-819604

------------------------------------------------------------
revno: 4890
revision-id: john at arbash-meinel.com-20110928150928-ln9wqqy1jddgjbo0
parent: john at arbash-meinel.com-20110928150744-s2y7j1o62iw4py3d
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-client-reconnect-819604
timestamp: Wed 2011-09-28 17:09:28 +0200
message:
  Do the same test using simple pipes
-------------- next part --------------
=== modified file 'bzrlib/tests/test_smart_transport.py'
--- a/bzrlib/tests/test_smart_transport.py	2011-09-28 15:07:44 +0000
+++ b/bzrlib/tests/test_smart_transport.py	2011-09-28 15:09:28 +0000
@@ -242,6 +242,15 @@
         # Even though the child process is dead, flush seems to be a no-op.
         client_medium._flush()
 
+    def test_simple_pipes__read_bytes_pipe_closed(self):
+        child_read, client_write = create_file_pipes()
+        client_medium = medium.SmartSimplePipesClientMedium(
+            child_read, client_write, 'base')
+        client_medium._accept_bytes('abc\n')
+        client_write.close()
+        self.assertEqual('abc\n', client_medium._read_bytes(4))
+        self.assertEqual('', client_medium._read_bytes(4))
+
     def test_simple_pipes__read_bytes_subprocess_closed(self):
         p = subprocess.Popen([sys.executable, '-c',
             'import sys\n'



More information about the bazaar-commits mailing list