Example #1
0
def deleteRowsRange(startindex, count, experror):
    i = startindex
    while i < startindex + count:
        tcpsock.send(interpreter.deleterow(ROWNAME_BASE + str(i)))
        obj = tcpsock.receive()
        interpreter.printdeleterowanswer(obj)
        errorcheck.checkerrorcode(experror, obj)
        i = i + 1
Example #2
0
def createTestrows(count, type, maxitems, experror):
    i = 0
    while i < count:
        tcpsock.send(
            interpreter.createrow(ROWNAME_BASE + str(i), type, maxitems))
        obj = tcpsock.receive()
        interpreter.printcreaterowanswer(obj)
        errorcheck.checkerrorcode(experror, obj)
        i = i + 1
Example #3
0
def addItemsNumberIncreasing(index, type, increment, start, count, experror):
    i = 0
    while i < count:
        tcpsock.send(
            interpreter.additem(ROWNAME_BASE + str(index), type,
                                start + (i * increment)))
        obj = tcpsock.receive()
        interpreter.printadditemanswer(obj)
        errorcheck.checkerrorcode(experror, obj)
        i = i + 1
Example #4
0
def addItemsStringIncreasing(index, increment, start, count, experror):
    i = 0
    while i < count:
        tcpsock.send(
            interpreter.additem(ROWNAME_BASE + str(index), 'string',
                                TEST_STRING + str((start + i * increment))))
        obj = tcpsock.receive()
        interpreter.printadditemanswer(obj)
        errorcheck.checkerrorcode(experror, obj)
        i = i + 1
Example #5
0
def addItemsBoolToggling(index, type, start, count, experror):
    i = 0
    state = start
    while i < count:
        tcpsock.send(
            interpreter.additem(ROWNAME_BASE + str(index), type, state))
        obj = tcpsock.receive()
        interpreter.printadditemanswer(obj)
        errorcheck.checkerrorcode(experror, obj)
        i = i + 1
        state = not state
Example #6
0
def readRowBytes(index, experror, expstart, explength):
    tcpsock.send(interpreter.readrow(ROWNAME_BASE + str(index), 'bytes'))
    obj = tcpsock.receive()
    interpreter.printreadrowanswer(obj)
    errorcheck.checkerrorcode(experror, obj)
    errorcheck.checksbytes(expstart, explength, obj)
Example #7
0
def readRowString(index, experror, expstart, expincrement):
    tcpsock.send(interpreter.readrow(ROWNAME_BASE + str(index), 'string'))
    obj = tcpsock.receive()
    interpreter.printreadrowanswer(obj)
    errorcheck.checkerrorcode(experror, obj)
    errorcheck.checkstrings(TEST_STRING, expstart, expincrement, obj)
Example #8
0
def readRowBool(index, experror, expstart):
    tcpsock.send(interpreter.readrow(ROWNAME_BASE + str(index), 'bool'))
    obj = tcpsock.receive()
    interpreter.printreadrowanswer(obj)
    errorcheck.checkerrorcode(experror, obj)
    errorcheck.checkbooltoggle(expstart, obj)
Example #9
0
def readRowNumber(index, type, experror, expstart, expincrement):
    tcpsock.send(interpreter.readrow(ROWNAME_BASE + str(index), type))
    obj = tcpsock.receive()
    interpreter.printreadrowanswer(obj)
    errorcheck.checkerrorcode(experror, obj)
    errorcheck.checknumbers(expstart, expincrement, obj)
Example #10
0
def clearAll(experror):
    tcpsock.send(interpreter.clearall())
    obj = tcpsock.receive()
    interpreter.printclearallanswer(obj)
    errorcheck.checkerrorcode(experror, obj)
Example #11
0
def getRowCount(experror, expcount):
    tcpsock.send(interpreter.getrowcount())
    obj = tcpsock.receive()
    interpreter.printrowcountanswer(obj)
    errorcheck.checkerrorcode(experror, obj)
    errorcheck.checkrowcount(expcount, obj)