diff options
author | achapp <adamdchappell@gmail.com> | 2014-11-24 18:08:26 -0600 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-12-17 15:51:19 -0800 |
commit | 34c4d0c4a29c8b3c26925c2a05a9b0e50a83f617 (patch) | |
tree | e966695812f921bd4dc2d5242dc71f49f8449406 /tests/test_file.py | |
parent | b3ed2d5b7eef96a349809517e2d782fca3906e94 (diff) |
Test update/Fix progress temp save
Edited test to catch readline error. file.py code change in progress
(DOES NOT WORK PROPERLY) so saving it temporarily.
Diffstat (limited to 'tests/test_file.py')
-rwxr-xr-x | tests/test_file.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_file.py b/tests/test_file.py index 22a34aca..24a7fa9b 100755 --- a/tests/test_file.py +++ b/tests/test_file.py @@ -70,13 +70,15 @@ class BufferedFileTest (unittest.TestCase): def test_2_readline(self): f = LoopbackFile('r+U') - f.write(b'First line.\nSecond line.\r\nThird line.\nFinal line non-terminated.') + f.write(b'First line.\nSecond line.\r\nThird line.\nFourth line.\nFifth line.\nFinal line non-terminated.') self.assertEqual(f.readline(), 'First line.\n') # universal newline mode should convert this linefeed: self.assertEqual(f.readline(), 'Second line.\n') # truncated line: self.assertEqual(f.readline(7), 'Third l') self.assertEqual(f.readline(), 'ine.\n') + self.assertEqual(f.readline(25), 'Fourth line.\n') + self.assertEqual(f.readline(), 'Fifth line.\n') self.assertEqual(f.readline(), 'Final line non-terminated.') self.assertEqual(f.readline(), '') f.close() |