Beispiel #1
0
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()
Beispiel #2
0
    def delete():
        """Delete all existing content and the database."""

        Database.delete_all_contents()
        Database.delete_storage()
Beispiel #3
0
    def fin():
        """Clear the resources at the end."""

        database.disconnect()
        Database.delete_all_contents()
        Database.delete_storage()
Beispiel #4
0
    def fin():
        """Clear the resources at the end."""

        snippy.release()
        Database.delete_all_contents()
        Database.delete_storage()