diff options
Diffstat (limited to 'test/git/async')
-rw-r--r-- | test/git/async/test_channel.py | 10 | ||||
-rw-r--r-- | test/git/async/test_pool.py | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/test/git/async/test_channel.py b/test/git/async/test_channel.py index ab4ae015..32458f31 100644 --- a/test/git/async/test_channel.py +++ b/test/git/async/test_channel.py @@ -33,18 +33,16 @@ class TestChannels(TestBase): assert time.time() - st >= to # writing to a closed channel raises - assert not wc.closed + assert not wc.closed() wc.close() - assert wc.closed + assert wc.closed() wc.close() # fine - assert wc.closed + assert wc.closed() - self.failUnlessRaises(IOError, wc.write, 1) + self.failUnlessRaises(ReadOnly, wc.write, 1) # reading from a closed channel never blocks - print "preblock" assert len(rc.read()) == 0 - print "got read(0)" assert len(rc.read(5)) == 0 assert len(rc.read(1)) == 0 diff --git a/test/git/async/test_pool.py b/test/git/async/test_pool.py index cccafddc..202fdb66 100644 --- a/test/git/async/test_pool.py +++ b/test/git/async/test_pool.py @@ -57,6 +57,10 @@ class TestThreadTaskNode(InputIteratorThreadTask): return self +class TestThreadFailureNode(TestThreadTaskNode): + """Fails after X items""" + + class TestThreadPool(TestBase): max_threads = cpu_count() |