Skip to content

Commit

Permalink
test: include crossing into end of stream in test
Browse files Browse the repository at this point in the history
  • Loading branch information
michalc committed Nov 13, 2023
1 parent 6d5d3fb commit afe1b72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test_to_file_like_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def test_basic_str_base():


def test_read_crossing_chunk_boundaries():
bytes_iter = ('ab', 'cd', 'ef')
f = to_file_like_obj(bytes_iter, base=str)
bytes_iter = (b'ab', b'cd', b'ef')
f = to_file_like_obj(bytes_iter)

assert [f.read(3), f.read(2), f.read(2)] == ['abc', 'de', 'f']
assert [f.read(3), f.read(2), f.read(2), f.read(2)] == [b'abc', b'de', b'f', b'']


def test_well_behaved():
Expand Down

0 comments on commit afe1b72

Please sign in to comment.