Ejemplo n.º 1
0
def client():
    main(["--raiseerr", "upgrade", "head"])

    with TestClient(app()) as client:
        yield client

    main(["--raiseerr", "downgrade", "base"])
Ejemplo n.º 2
0
 def get_app(self):
   return main.app()
Ejemplo n.º 3
0
#Test selectAction()

import main as program

app = program.app()
app.setup()
Ejemplo n.º 4
0
def init(file_name):
    try:
        f = open(file_name, mode="w")
        return f
    except:  # pylint: disable=bare-except
        print(file_name + " cannot open!")
        return


def format_to_num(d):
    return str(int(d))


def write(f, data):
    format_data = ' '.join(map(format_to_num, data)) + '\n'
    f.write(format_data)


if __name__ == "__main__":
    if len(sys.argv) == 2:
        main.app(data_mode=enums.DataMode.SERIAL,
                 view_mode=enums.ViewMode.CREATE_DATA_WITH_TERMINAL,
                 create_file_name=sys.argv[1],
                 data_length=2)
    else:
        main.app(data_mode=enums.DataMode.SERIAL,
                 view_mode=enums.ViewMode.CREATE_DATA_WITH_TERMINAL,
                 has_bool=True,
                 data_length=1)
Ejemplo n.º 5
0
    length = len(data)
    t = i % length
    r = math.floor(i / length)

    step = math.floor(length / row)
    res = [str(data[-1][0] * r + data[t][0]).encode()]

    for j in range(0, row):
        a = (t + step * j) % length
        res.append(str(data[a][1]).encode())

    if has_bool:
        for j in range(0, row):
            a = (t + step * j) % length
            res.append(str(data[a][2]).encode())

    time.sleep(0.1)
    return res


if __name__ == "__main__":
    if len(sys.argv) == 2:
        main.app(data_mode=enums.DataMode.TEST,
                 view_mode=enums.ViewMode.ALL,
                 import_file_name=sys.argv[1],
                 data_length=2)
    else:
        main.app(data_mode=enums.DataMode.TEST,
                 view_mode=enums.ViewMode.ALL,
                 data_length=2)
Ejemplo n.º 6
0
#Test selectAction()

import main
#create app
app = main.app('test')
#get user input
app.fetchUserInput()
#assign code
assigmentCode = app.codeReader(app.getUserInput(), app.getPreviousInput())
#call action select
action = app.actionSelect(assigmentCode)
print(action)
Ejemplo n.º 7
0
"""PCPPPriceDropTracker main __main__ module."""

if __name__ == "__main__":
    from main import app
    app()
Ejemplo n.º 8
0
def application(environ, start_response):
    return app(environ, start_response)
Ejemplo n.º 9
0
from main import app

RM_1 = 0
M = 0
ext = 0
RBA_1 = 0
UIT = 0
M_R = 0
IAP_1 = 0
suma = 0
RNA_1 = 0
R_M_1 = 0
TRM = 0
MA = 0
MIA = 0
RMA = 0
var = 0
RAM_1 = 0
app(RM_1, M, ext, RBA_1, UIT, M_R, IAP_1, suma, RNA_1, R_M_1, TRM, MA, MIA,
    RMA, var, RAM_1)