def assert_is_read(self):
current_index = self.tell()<EOL>bytes = self.getvalue()<EOL>maximum_index = len(bytes)<EOL>everything_is_read = current_index == maximum_index<EOL>message = "<STR_LIT>""<STR_LIT>""<STR_LIT>".format(repr(bytes), maximum_index - current_index,<EOL>repr(bytes[current_index:]))<EOL>assert everything_is_read, message<EOL>
Make sure this message is read 100%.