def testGetPythonExecutable(self):
     self.assertEqual( 'titi', rpdb2.get_python_executable( interpreter='titi' ) )
     self.assertEqual( 'fake_executable', rpdb2.get_python_executable( interpreter='' ) )
     self.assertEqual( 'fake_executable', rpdb2.get_python_executable( interpreter=rpdb2.as_unicode('') ) )
     self.assertEqual( 'fake_executable', rpdb2.get_python_executable( interpreter=None ) )
     self.assertEqual( 'fake_executable', rpdb2.get_python_executable() )
Example #2
0
if sys.platform != 'win32' or sys.version_info[:2] < (2,7) or ((3,0) <= sys.version_info[:2] <= (3,1)):
    CREATE_NEW_PROCESS_GROUP=0x200
else:
    CREATE_NEW_PROCESS_GROUP=subprocess.CREATE_NEW_PROCESS_GROUP

HAS_PSKILL=False
if sys.platform == 'win32':
    try:
        rpdb2.FindFile('pskill.exe')
        HAS_PSKILL=True
    except IOError:
        pass

PYTHON=sys.executable
DEBUGME=rpdb2.as_unicode('debugme.py')
RPDB2 = 'rpdb2.py'
PWD=rpdb2.as_unicode('toto')

STEPS = [ 'tests/%s' % f for f in ('start', 'f1', 'f2', 'f3', 'done') ]

class FakeStdin:
    def __init__(self):
        self.please_stop = False
        self.lines = []
        self.dispStdin = True

    def appendCmd( self, l ):
        cmd = l if (l[-1] == '\n') else (l + '\n')
        self.lines.append( cmd )
Example #3
0
if sys.platform != 'win32' or sys.version_info[:2] < (2, 7) or (
    (3, 0) <= sys.version_info[:2] <= (3, 1)):
    CREATE_NEW_PROCESS_GROUP = 0x200
else:
    CREATE_NEW_PROCESS_GROUP = subprocess.CREATE_NEW_PROCESS_GROUP

HAS_PSKILL = False
if sys.platform == 'win32':
    try:
        rpdb2.FindFile('pskill.exe')
        HAS_PSKILL = True
    except IOError:
        pass

PYTHON = sys.executable
DEBUGME = rpdb2.as_unicode('debugme.py')
RPDB2 = 'rpdb2.py'
PWD = rpdb2.as_unicode('toto')

STEPS = ['tests/%s' % f for f in ('start', 'f1', 'f2', 'f3', 'done')]


class FakeStdin:
    def __init__(self):
        self.please_stop = False
        self.lines = []
        self.dispStdin = True

    def appendCmd(self, l):
        cmd = l if (l[-1] == '\n') else (l + '\n')
        self.lines.append(cmd)