Skip to content

Commit

Permalink
Standardize on raise AssertionError(...).
Browse files Browse the repository at this point in the history
  • Loading branch information
aaugustin committed Aug 20, 2024
1 parent 9e5b91b commit 453e55a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion experiments/optimization/parse_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def parse_frame(data, count, mask, extensions):
except StopIteration:
pass
else:
assert False, "parser should return frame"
raise AssertionError("parser should return frame")
reader.feed_eof()
assert reader.at_eof(), "parser should consume all data"

Expand Down
2 changes: 1 addition & 1 deletion experiments/optimization/parse_handshake.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def parse_handshake(handshake):
except StopIteration:
pass
else:
assert False, "parser should return request"
raise AssertionError("parser should return request")
reader.feed_eof()
assert reader.at_eof(), "parser should consume all data"

Expand Down

0 comments on commit 453e55a

Please sign in to comment.