Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibo-Joshi committed May 20, 2024
1 parent c89cad2 commit b142bb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/ext/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -2454,6 +2454,7 @@ async def callback(update, context):
)
assert record.levelno == logging.CRITICAL

# Let's also check that no critical log is produced when the exception is not raised
caplog.clear()
with caplog.at_level(logging.CRITICAL):
await app.process_update(2)
Expand Down Expand Up @@ -2493,6 +2494,7 @@ async def callback(update, context):
)
assert record.levelno == logging.CRITICAL

# Let's also check that no critical log is produced when the exception is not raised
caplog.clear()
with caplog.at_level(logging.CRITICAL):
await app.process_error(update=None, error=2)
Expand Down
2 changes: 1 addition & 1 deletion tests/ext/test_jobqueue.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,6 @@ async def test_run_job_exception_in_building_context(
original_from_job = CallbackContext.from_job

def raise_exception(job, application):
print(job, job.data, application)
if job.data == 1:
raise exception
return original_from_job(job, application)
Expand All @@ -680,6 +679,7 @@ async def job_callback(context):
)
assert record.levelno == logging.CRITICAL

# Let's also check that no critical log is produced when the exception is not raised
caplog.clear()
with caplog.at_level(logging.CRITICAL):
job_queue.run_once(job_callback, 0.1, data=2)
Expand Down

0 comments on commit b142bb4

Please sign in to comment.