Skip to content

Commit

Permalink
it was!
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans committed Dec 6, 2024
1 parent 708a3e8 commit 14253d3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/unit_server/arghandler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,12 +712,11 @@ def _error_it():
arghand.add_argument(
arg,
type=_error_it,
# NOTE: ^^^ because this takes no arguments (isn't a lambda),
# argparse treats it like any other error. why? idk :/
)

with pytest.raises(tornado.web.HTTPError) as e:
arghand.parse_args()

assert (
str(e.value)
== "HTTP 400: argument foo: it's a bad value and you *will* see this!"
)
assert str(e.value) == "HTTP 400: argument foo: invalid type"

0 comments on commit 14253d3

Please sign in to comment.