diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-08 13:24:44 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-08 13:24:44 +0200 |
commit | 3776f7a766851058f6435b9f606b16766425d7ca (patch) | |
tree | 8096d6d84090f4abc5aad374c1fe6f64088572a6 /test/git/async/test_channel.py | |
parent | 09c3f39ceb545e1198ad7a3f470d4ec896ce1add (diff) | |
download | gitpython-3776f7a766851058f6435b9f606b16766425d7ca.tar.gz |
The new channeldesign actually works, but it also shows that its located at the wrong spot. The channel is nothing more than an adapter allowing to read multiple items from a thread-safe queue, the queue itself though must be 'closable' for writing, or needs something like a writable flag.
Diffstat (limited to 'test/git/async/test_channel.py')
-rw-r--r-- | test/git/async/test_channel.py | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/test/git/async/test_channel.py b/test/git/async/test_channel.py index acfbd15e..25eb974c 100644 --- a/test/git/async/test_channel.py +++ b/test/git/async/test_channel.py @@ -43,26 +43,4 @@ class TestChannels(TestBase): # reading from a closed channel never blocks assert len(rc.read()) == 0 - - - - # TEST LIMITED SIZE CHANNEL - # channel with max-items set - wc, rc = Channel(1) - wc.write(item) # fine - - # blocks for a a moment, its full - st = time.time() - self.failUnlessRaises(EOFError, wc.write, item, True, to) - assert time.time() - st >= to - - # get our only one - assert rc.read(1)[0] == item - - # its empty,can put one again - wc.write(item2) - wc.close() - - # reading 10 will only yield one, it will not block as its closed - assert rc.read(10, timeout=1)[0] == item2 - + |