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()
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.")
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)
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)