github.com/mit-dci/lit@v0.0.0-20221102210550-8c3d3b49f2ce/test/itest_testlib.py (about) 1 import testlib 2 3 create = 1 4 5 def run_test(env): 6 litcnt = len(env.lits) 7 print('Found', len(env.lits), 'Lit nodes created.') 8 if litcnt == create: 9 print('OK') 10 else: 11 print('ERR') 12 13 if __name__ == '__main__': 14 env = None 15 try: 16 env = testlib.TestEnv(create) 17 run_test(env) 18 finally: 19 if env is not None: 20 env.shutdown()