Skip to content

Commit

Permalink
Merge pull request #106 from python-hyper/requires-io-master
Browse files Browse the repository at this point in the history
[requires.io] dependency update on master branch
  • Loading branch information
Lukasa committed Oct 24, 2017
2 parents 219f292 + 992f842 commit 86df64b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions test/test_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,29 +56,29 @@ def test_parse_frame_header_ignore_first_bit_of_stream_id(self):
assert f.stream_id == 0

def test_parse_frame_header_unknown_type(self):
f, l = Frame.parse_frame_header(
frame, length = Frame.parse_frame_header(
b'\x00\x00\x59\xFF\x00\x00\x00\x00\x01'
)
assert f.type == 0xFF
assert l == 0x59
assert isinstance(f, ExtensionFrame)
assert f.stream_id == 1
assert frame.type == 0xFF
assert length == 0x59
assert isinstance(frame, ExtensionFrame)
assert frame.stream_id == 1

def test_flags_are_persisted(self):
f, l = Frame.parse_frame_header(
frame, length = Frame.parse_frame_header(
b'\x00\x00\x59\xFF\x09\x00\x00\x00\x01'
)
assert f.type == 0xFF
assert l == 0x59
assert f.flag_byte == 0x09
assert frame.type == 0xFF
assert length == 0x59
assert frame.flag_byte == 0x09

def test_parse_body_unknown_type(self):
f = decode_frame(
frame = decode_frame(
b'\x00\x00\x0C\xFF\x00\x00\x00\x00\x01hello world!'
)
assert f.body == b'hello world!'
assert f.body_len == 12
assert f.stream_id == 1
assert frame.body == b'hello world!'
assert frame.body_len == 12
assert frame.stream_id == 1

def test_can_round_trip_unknown_frames(self):
frame_data = b'\x00\x00\x0C\xFF\x00\x00\x00\x00\x01hello world!'
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ commands= py.test -n 4 hyperframe {toxinidir}/test/

[testenv:lint]
basepython=python3.4
deps = flake8==3.4.1
deps = flake8==3.5.0
commands = flake8 --max-complexity 10 hyperframe test

0 comments on commit 86df64b

Please sign in to comment.