merging some old changes (still struggling with mercurial a bit)

--HG--
branch : 1.0.x
This commit is contained in:
holger krekel
2009-07-08 16:44:40 +02:00
5 changed files with 53 additions and 15 deletions
+1 -1
View File
@@ -230,7 +230,7 @@ class Gateway(object):
from sys import exc_info
channel, (source, outid, errid) = item
try:
loc = { 'channel' : channel }
loc = { 'channel' : channel, '__name__': '__channelexec__'}
self._trace("execution starts:", repr(source)[:50])
close = self._local_redirect_thread_output(outid, errid)
try:
+5
View File
@@ -92,6 +92,11 @@ class BasicRemoteExecution:
def test_repr_doesnt_crash(self):
assert isinstance(repr(self), str)
def test_attribute__name__(self):
channel = self.gw.remote_exec("channel.send(__name__)")
name = channel.receive()
assert name == "__channelexec__"
def test_correct_setup_no_py(self):
channel = self.gw.remote_exec("""
import sys