Skip to content

Commit

Permalink
revert some autofixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rkingsbury committed Jul 31, 2023
1 parent c5c3e9b commit e1fea26
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/cli/test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ async def test_backpressure():
await releaser.__anext__()

# Ensure stop iteration works
for _i in range(10):
with pytest.raises(StopAsyncIteration):
with pytest.raises(StopAsyncIteration): # noqa: PT012
for _i in range(10):
await releaser.__anext__()

assert not backpressure.back_pressure.locked()
Expand Down
4 changes: 2 additions & 2 deletions tests/stores/test_advanced_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def test_mgrant_init():
with pytest.raises(StoreError):
store = MongograntStore("", "", username="")

store = MongograntStore("", "")
with pytest.raises(ValueError):
with pytest.raises(ValueError): # noqa: PT012
store = MongograntStore("", "")
store.connect()


Expand Down
8 changes: 4 additions & 4 deletions tests/stores/test_mongolike.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ def test_mongostore_last_updated(mongostore):
assert mongostore.last_updated == datetime.min
start_time = datetime.utcnow()
mongostore._collection.insert_one({mongostore.key: 1, "a": 1})
# mongostore.last_updated
with pytest.raises(StoreError) as cm:
with pytest.raises(StoreError) as cm: # noqa: PT012
mongostore.last_updated # noqa: B018
assert cm.match(mongostore.last_updated_field)
mongostore.update([{mongostore.key: 1, "a": 1, mongostore.last_updated_field: datetime.utcnow()}])
assert mongostore.last_updated > start_time
Expand Down Expand Up @@ -399,8 +399,8 @@ def test_monty_store_last_updated(montystore):
assert montystore.last_updated == datetime.min
start_time = datetime.utcnow()
montystore._collection.insert_one({montystore.key: 1, "a": 1})
montystore.last_updated # noqa: B018
with pytest.raises(StoreError) as cm:
with pytest.raises(StoreError) as cm: # noqa: PT012
montystore.last_updated # noqa: B018
assert cm.match(montystore.last_updated_field)
montystore.update([{montystore.key: 1, "a": 1, montystore.last_updated_field: datetime.utcnow()}])
assert montystore.last_updated > start_time
Expand Down

0 comments on commit e1fea26

Please sign in to comment.