Reword the comments in the test suite

Each comment is one sentence or two short ones
joined by "=>", without a final period.
This commit is contained in:
Alexander Hess 2026-12-03 10:52:09 +01:00
commit bca4250b4d
Signed by: alexander
GPG key ID: B46EDB4DFC26805D

View file

@ -54,8 +54,8 @@ def db_connection(request):
This ensures that Alembic's migration files are consistent.
"""
# We need a fresh database connection for each of the two `params`.
# Otherwise, the first test of the parameter run second will fail.
# Each of the two `params` needs a fresh database connection
# => Otherwise, the first test of the second parameter run fails
engine = sa.create_engine(pkg_config.DATABASE_URI)
connection = engine.connect()
@ -98,9 +98,8 @@ def db_session(db_connection, monkeypatch):
# that is rolled back at the end of each test case
transaction = db_connection.begin()
# Create a session bound to the same connection as the `transaction`.
# Using any other session would not result in the roll back.
# Commits inside a test case then only release a savepoint.
# The session joins the `transaction`'s connection to be rolled back with it
# => Commits inside a test case only release a savepoint
session = orm.Session(bind=db_connection, join_transaction_mode="create_savepoint")
# Monkey patch the package's global `session` object,