diff options
author | achapp <adamdchappell@gmail.com> | 2014-11-25 12:30:32 -0600 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-12-17 15:51:19 -0800 |
commit | 0a5485390d43f408b130011ae3452855e766786d (patch) | |
tree | 89691efa30620d7da6d28e42fba2348e2b132207 /tests/test_file.py | |
parent | 34c4d0c4a29c8b3c26925c2a05a9b0e50a83f617 (diff) |
new readline test passes
Changed file.py readline() to always check for a newline. Had to make a
few changes for what went into self._rbuffer in the case where buffer
size was met or exceeded and we found a newline.
Diffstat (limited to 'tests/test_file.py')
-rwxr-xr-x | tests/test_file.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test_file.py b/tests/test_file.py index 24a7fa9b..044dc591 100755 --- a/tests/test_file.py +++ b/tests/test_file.py @@ -77,6 +77,7 @@ class BufferedFileTest (unittest.TestCase): # truncated line: self.assertEqual(f.readline(7), 'Third l') self.assertEqual(f.readline(), 'ine.\n') + # readline should not read past the fourth line self.assertEqual(f.readline(25), 'Fourth line.\n') self.assertEqual(f.readline(), 'Fifth line.\n') self.assertEqual(f.readline(), 'Final line non-terminated.') |