merging some old changes (still struggling with mercurial a bit)
--HG-- branch : 1.0.x
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user