156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 | |
def test_channel_error_reporting(self): |
channel = self.gw.remote_exec('def foo():\n return foobar()\nfoo()\n') |
try: |
-> channel.receive() |
except channel.RemoteError, e: |
assert str(e).startswith('Traceback (most recent call last):') |
assert str(e).find('NameError: global name \'foobar\' ' |
'is not defined') > -1 |
else: |
py.test.fail('No exception raised') | |