1 from __future__ import with_statement
5 from eventlet import greenio
6 from tests import LimitedTestCase
9 class TestGreenPipeWithStatement(LimitedTestCase):
10 def test_pipe_context(self):
11 # ensure using a pipe as a context actually closes it.
14 r = greenio.GreenPipe(r)
15 w = greenio.GreenPipe(w, 'w')
20 assert r.closed and not w.closed
25 assert r.closed and w.closed