call site 10 for execnet.Channel.isclosed
execnet/testing/test_gateway.py - line 335
331
332
333
334
335
   def test_channel_file_write_error(self): 
       channel = self.gw.remote_exec("pass") 
       f = channel.makefile() 
       channel.waitclose(TESTTIMEOUT)
->     py.test.raises(IOError, f.write, 'hello')
test/raises.py - line 30
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
   def raises(ExpectedException, *args, **kwargs):
       """ raise AssertionError, if target code does not raise the expected
           exception.
       """
       assert args
       __tracebackhide__ = True 
       if isinstance(args[0], str):
           expr, = args
           assert isinstance(expr, str)
           frame = sys._getframe(1)
           loc = frame.f_locals.copy()
           loc.update(kwargs)
           #print "raises frame scope: %r" % frame.f_locals
           source = py.code.Source(expr)
           try:
               exec source.compile() in frame.f_globals, loc
               #del __traceback__
               # XXX didn'T mean f_globals == f_locals something special?
               #     this is destroyed here ...
           except ExpectedException:
               return py.code.ExceptionInfo()
       else:
           func = args[0]
           assert callable
           try:
->             func(*args[1:], **kwargs)
               #del __traceback__
           except ExpectedException:
               return py.code.ExceptionInfo()
           k = ", ".join(["%s=%r" % x for x in kwargs.items()])
           if k:
               k = ', ' + k
           expr = '%s(%r%s)' %(func.__name__, args, k)
       raise ExceptionFailure(msg="DID NOT RAISE", 
                              expr=args, expected=ExpectedException) 
execnet/channel.py - line 309
308
309
   def write(self, out):
->     self.channel.send(out)
execnet/channel.py - line 155
149
150
151
152
153
154
155
156
157
158
159
160
   def send(self, item):
       """sends the given item to the other side of the channel,
           possibly blocking if the sender queue is full.
           Note that an item needs to be marshallable.
           """
       if self.isclosed(): 
->         raise IOError, "cannot send to %r" %(self,) 
       if isinstance(item, Channel):
           data = Message.CHANNEL_NEW(self.id, item.id)
       else:
           data = Message.CHANNEL_DATA(self.id, item)
       self.gateway._outgoing.put(data)
execnet/channel.py - line 66
65
66
67
   def __repr__(self):
->     flag = self.isclosed() and "closed" or "open"
       return "<Channel id=%d %s>" % (self.id, flag)