Esempio n. 1
0
def vTestCreated(oCtx):
    lCmdLine = []
    # get command line arguments from oCtx.config.userdata
    if oCtx.config.userdata:
        for sKey, gVal in oCtx.config.userdata.items():
            # check the argparser instance
            lCmdLine += ['--' + sKey, gVal]
    oCtx.userdata['oMain'] = OTCmd2.oMain(lCmdLine)
    oCtx.userdata['oMain'].onecmd('set echo True')
    sOut, sErr = lCheckStdoutStdErr(oCtx)
    assert sOut
    assert 'True' in sOut
Esempio n. 2
0
def vTestCreated(oCtx):
    lCmdLine = []
    # get command line arguments from oCtx.config.userdata
    if oCtx.config.userdata:
        for sKey, gVal in oCtx.config.userdata.items():
            # check the argparser instance
            lCmdLine += ['--'+sKey, gVal]
    oCtx.userdata['oMain'] = OTCmd2.oMain(lCmdLine)
    oCtx.userdata['oMain'].onecmd('set echo True')
    sOut, sErr = lCheckStdoutStdErr(oCtx)
    assert sOut
    assert 'True' in sOut
Esempio n. 3
0
def oMain():
    sIni = os.path.join(os.path.dirname(OpenTrader.__file__), 'OTCmd2.ini')
    lCmdLine = ['-c', sIni]
    oMain = OTCmd2.oMain(lCmdLine)
    return oMain
Esempio n. 4
0
def oMain():
    sIni = os.path.join(os.path.dirname(OpenTrader.__file__), 'OTCmd2.ini')
    lCmdLine = ['-c', sIni]
    oMain = OTCmd2.oMain(lCmdLine)
    return oMain