alembic_migration_fixtures/fixtures.py
def _real_db_session(engine: sqlalchemy.engine.Engine) -> Iterator[Session]:
    """Context manager for a normal SQLAlchemy session to be used during before test setup.

    Args:
        engine: SQLAlchemy engine to use to connect to the database.

    Returns:
        Self-closing SQLAlchemy session.
    """
    connection = engine.connect()
    session = Session(bind=connection)
    yield session
    connection.close()
    session.close()
Context manager for a normal SQLAlchemy session to be used during before test setup.

    Args:
        engine: SQLAlchemy engine to use to connect to the database.

    Returns:
        Self-closing SQLAlchemy session.
    
Context manager for a normal SQLAlchemy session to be used during before test setup.
Context manager for a normal SQLAlchemy session to be used during before test setup .
def _real_db_session(engine: sqlalchemy.engine.Engine) -> Iterator[Session]:
    connection = engine.connect()
    session = Session(bind=connection)
    yield session
    connection.close()
    session.close()
def _real_db_session ( engine : sqlalchemy . engine . Engine ) -> Iterator [ Session ] : connection = engine . connect ( ) session = Session ( bind = connection ) yield session connection . close ( ) session . close ( )
Context manager for a normal SQLAlchemy session to be used during before test setup.
Context manager for a normal SQLAlchemy session to be used during before test setup .
"""Context manager for a normal SQLAlchemy session to be used during before test setup.

    Args:
        engine: SQLAlchemy engine to use to connect to the database.

    Returns:
        Self-closing SQLAlchemy session.
    """
Self-closing SQLAlchemy session.
Self - closing SQLAlchemy session .
engine
sqlalchemy.engine.Engine
None