Awesome Reviewers

Favor pytest’s built-in testing utilities over manual, imperative patterns to keep tests concise, correct, and maintainable.

# Avoid
try:
    flask.send_from_directory('static', 'bad\x00')
    assert False
except BadRequest:
    pass

# Prefer
with pytest.raises(BadRequest):
    flask.send_from_directory('static', 'bad\x00')

Applying these patterns reduces boilerplate, avoids subtle bugs (such as code after a raising call never executing), and makes test intent and coverage easier to follow.