From 22db02c82f29e22052ebc8d0436c332ced36f91f Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Tue, 11 Apr 2006 15:48:06 -0700 Subject: [PATCH] [project @ robey@lag.net-20060411224806-2683ac099f9608ae] add a test that feed/read can happen piecemeal --- tests/test_buffered_pipe.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_buffered_pipe.py b/tests/test_buffered_pipe.py index 8e4a428..2cac2b1 100644 --- a/tests/test_buffered_pipe.py +++ b/tests/test_buffered_pipe.py @@ -47,6 +47,12 @@ class BufferedPipeTest (unittest.TestCase): self.assert_(p.read_ready()) data = p.read(6) self.assertEquals('hello.', data) + + p.feed('plus/minus') + self.assertEquals('plu', p.read(3)) + self.assertEquals('s/m', p.read(3)) + self.assertEquals('inus', p.read(4)) + p.close() self.assert_(not p.read_ready()) self.assertEquals('', p.read(1))