def pytest_sessionstart(session): """Pytest hook called when session is started. This hook is called before the Pytest report header hook is called and after the Pytest command line arguments have been parsed. Args: session (obj): Pytest Session() object. """ database = session.config.getoption("--snippy-db") Database.set_database(database) Database.delete_all_contents()
def delete(): """Delete all existing content and the database.""" Database.delete_all_contents() Database.delete_storage()
def fin(): """Clear the resources at the end.""" database.disconnect() Database.delete_all_contents() Database.delete_storage()
def fin(): """Clear the resources at the end.""" snippy.release() Database.delete_all_contents() Database.delete_storage()