Skip to content

Commit

Permalink
add test for full coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Kriechi committed Nov 23, 2024
1 parent e574f0d commit 3789435
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test_hpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
from hpack.hpack import _dict_to_iterable, _to_bytes


def test_to_bytes():
assert _to_bytes(b"foobar") == b"foobar"
assert _to_bytes("foobar") == b"foobar"
assert _to_bytes(0xABADBABE) == b'2880289470'
assert _to_bytes(True) == b'True'
assert _to_bytes(Encoder()).startswith(b"<hpack.hpack.Encoder")


class TestHPACKEncoder:
# These tests are stolen entirely from the IETF specification examples.
def test_literal_header_field_with_indexing(self):
Expand Down

0 comments on commit 3789435

Please sign in to comment.