예제 #1
0
파일: test_rom.py 프로젝트: mayfield/rom
def main():
    _disable_lua_writes()
    global_setup()
    print("Testing standard writing")
    try:
        unittest.main()
    except SystemExit:
        pass
    data = get_state()
    global_setup()
    _enable_lua_writes()
    print("Testing Lua writing")
    try:
        unittest.main()
    except SystemExit:
        pass
    lua_data = get_state()
    global_setup()
예제 #2
0
파일: test_rom.py 프로젝트: thedrow/rom
def main():
    testsFailed = False
    _disable_lua_writes()
    global_setup()
    print("Testing standard writing")
    try:
        unittest.main()
    except SystemExit as err:
        testsFailed = testsFailed or err.code
    data = get_state()
    global_setup()
    _enable_lua_writes()
    print("Testing Lua writing")
    try:
        unittest.main()
    except SystemExit as err:
        testsFailed = testsFailed or err.code
    lua_data = get_state()
    global_setup()

    if testsFailed:
        raise Exception("Tests failed.")
예제 #3
0
            200,
            1<<15,
            #1<<63,
            #1<<128,
            #1<<256,
        ]

        for i, num in enumerate(numbers):
            RomTestBigInt(num=num).save()
            session.commit()
            session.rollback()
            echo = RomTestBigInt.get(i+1).num
            self.assertEqual(num, echo)

if __name__ == '__main__':
    _disable_lua_writes()
    global_setup()
    print("Testing standard writing")
    unittest.main(exit=False)
    data = get_state()
    global_setup()
    _enable_lua_writes()
    print("Testing Lua writing")
    unittest.main(exit=False)
    lua_data = get_state()
    global_setup()

    ## if data != lua_data:
        ## print("WARNING: Regular/Lua data writing does not match!")
        ## import pprint
        ## pprint.pprint(data)
예제 #4
0
            1 << 15,
            #1<<63,
            #1<<128,
            #1<<256,
        ]

        for i, num in enumerate(numbers):
            RomTestBigInt(num=num).save()
            session.commit()
            session.rollback()
            echo = RomTestBigInt.get(i + 1).num
            self.assertEqual(num, echo)


if __name__ == '__main__':
    _disable_lua_writes()
    global_setup()
    print("Testing standard writing")
    unittest.main(exit=False)
    data = get_state()
    global_setup()
    _enable_lua_writes()
    print("Testing Lua writing")
    unittest.main(exit=False)
    lua_data = get_state()
    global_setup()

    ## if data != lua_data:
    ## print("WARNING: Regular/Lua data writing does not match!")
    ## import pprint
    ## pprint.pprint(data)