def status(message): print(f"[·] {message}", end="") try: yield except: # noqa: E722 print(f"\r[✗] {message}") raise else: print(f"\r[✓] {message}") finally: models.DBSession().commit()
def status(message): print(f'[·] {message}', end='') try: yield except: print(f'\r[✗] {message}') raise else: print(f'\r[✓] {message}') finally: models.DBSession().commit()
def teardown(): models.DBSession().rollback()