read all remaining lines from the file
(self)
| 94 | return s + t |
| 95 | |
| 96 | def readlines(self): |
| 97 | """read all remaining lines from the file""" |
| 98 | s = self.read() |
| 99 | lines = [] |
| 100 | i, j = 0, s.find("\n") |
| 101 | while j > -1: |
| 102 | lines.append(s[i:j+1]) |
| 103 | i = j+1 |
| 104 | j = s.find("\n", i) |
| 105 | if i < len(s): |
| 106 | # Only get here if the last line doesn't have a newline |
| 107 | lines.append(s[i:]) |
| 108 | return lines |
| 109 | |
| 110 | def _check_no_buffer(self): |
| 111 | # If 'nobuffer' called and finished with the buffer file |
no test coverage detected