Remove periods from one-sentence comments
This commit is contained in:
parent
454c2898a0
commit
049a5f6f62
1 changed files with 308 additions and 308 deletions
|
|
@ -49,7 +49,7 @@ class TestConstraints:
|
|||
db_session.add(replayed_order)
|
||||
db_session.commit()
|
||||
|
||||
# Must delete without ORM as otherwise an UPDATE statement is emitted.
|
||||
# Must delete without ORM as otherwise an UPDATE statement is emitted
|
||||
stmt = sa.delete(db.ReplaySimulation).where(
|
||||
db.ReplaySimulation.id == replayed_order.simulation.id,
|
||||
)
|
||||
|
|
@ -65,7 +65,7 @@ class TestConstraints:
|
|||
db_session.add(replayed_order)
|
||||
db_session.commit()
|
||||
|
||||
# Must delete without ORM as otherwise an UPDATE statement is emitted.
|
||||
# Must delete without ORM as otherwise an UPDATE statement is emitted
|
||||
stmt = sa.delete(db.Order).where(db.Order.id == replayed_order.actual.id)
|
||||
|
||||
with pytest.raises(sa_exc.IntegrityError, match="fk_replayed_orders_to_orders"):
|
||||
|
|
@ -79,13 +79,13 @@ class TestConstraints:
|
|||
):
|
||||
"""Remove a record that is referenced with a FK."""
|
||||
# Need a second courier, one that is
|
||||
# not associated with the `.actual` order.
|
||||
# not associated with the `.actual` order
|
||||
replayed_order.courier = make_courier()
|
||||
|
||||
db_session.add(replayed_order)
|
||||
db_session.commit()
|
||||
|
||||
# Must delete without ORM as otherwise an UPDATE statement is emitted.
|
||||
# Must delete without ORM as otherwise an UPDATE statement is emitted
|
||||
stmt = sa.delete(db.Courier).where(db.Courier.id == replayed_order.courier.id)
|
||||
|
||||
with pytest.raises(
|
||||
|
|
@ -304,12 +304,12 @@ class TestConstraints:
|
|||
|
||||
# Make the `scheduled_delivery_at` the quarter of an hour
|
||||
# following the next quarter of an hour (i.e., the timestamp
|
||||
# is between 15 and 30 minutes into the future).
|
||||
# is between 15 and 30 minutes into the future)
|
||||
replay_pre_order.ad_hoc = False
|
||||
replay_pre_order.actual.ad_hoc = False
|
||||
minutes_to_next_quarter = 15 - (replay_pre_order.placed_at.minute % 15)
|
||||
scheduled_delivery_at = (
|
||||
# `.placed_at` may have non-0 seconds.
|
||||
# `.placed_at` may have non-0 seconds
|
||||
replay_pre_order.placed_at.replace(second=0)
|
||||
+ dt.timedelta(minutes=(minutes_to_next_quarter + 15))
|
||||
)
|
||||
|
|
@ -398,11 +398,11 @@ class TestConstraints:
|
|||
):
|
||||
"""Insert an instance with invalid data."""
|
||||
# Setting `.cancelled_at` to the end of a day
|
||||
# ensures the timestamps are logically ok.
|
||||
# ensures the timestamps are logically ok
|
||||
replayed_order.cancelled_at = dt.datetime(*test_config.DATE, 23)
|
||||
|
||||
# Set all timestamps after `.reached_pickup_at` to NULL
|
||||
# except the one under test.
|
||||
# except the one under test
|
||||
for unset_column in (
|
||||
"pickup_at",
|
||||
"left_pickup_at",
|
||||
|
|
@ -572,7 +572,7 @@ class TestConstraints:
|
|||
"""
|
||||
replayed_pre_order = make_replay_order(scheduled=True)
|
||||
# As we subtract 1 second in the generic case,
|
||||
# choose one second after a quarter of an hour.
|
||||
# choose one second after a quarter of an hour
|
||||
replayed_pre_order.placed_at = dt.datetime(*test_config.DATE, 11, 45, 1)
|
||||
self.test_timestamps_unordered(
|
||||
db_session,
|
||||
|
|
|
|||
Loading…
Reference in a new issue