-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HttpSession: Improve error message when someone forgot to pass catch_…
…response=True + small optimization (#2762) * Dont create fake new Request object to attach to LocustResponse, use the one from the exception instead * Various type hint fixes in LocustResponse/HttpSession * Dont fail on "... takes 1 positional argument but 2 were given" when trying to give descriptive error message when .failure/.success is called without a catch_response=True * avoid mypy error "Signature of "request" incompatible with supertype "Session" [override]" * another place where mypy doesnt understand typing but pylance does... * Rename "missing catch_response=True"-methods. further clarify error message. * ignore type in one place * remove unused imports --------- Co-authored-by: Lars Holmberg <[email protected]>
- Loading branch information
Showing
1 changed file
with
14 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters