Skip to content

Commit

Permalink
Add additional check that using seek and rereading will work
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Apr 10, 2023
1 parent 2d66b3c commit 5c80f0a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/lsst/resources/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def _check_open(
test_case.assertEqual(len(bytes_read), 0)
bytes_read = read_buffer.read(size)
test_case.assertEqual(len(bytes_read), 0)
read_buffer.seek(0)
bytes_read = read_buffer.read(size)
test_case.assertEqual(bytes_read, content)
# Write two copies of the content, overwriting the single copy there.
with uri.open("w" + mode_suffix, **kwargs) as write_buffer:
write_buffer.write(double_content)
Expand Down

0 comments on commit 5c80f0a

Please sign in to comment.