Пример #1
0
 def test_eof(self):
     self.testfile.read()
     result = utils._read_file_chunk(self.testfile, 10)
     self.assertEqual(result, [])
Пример #2
0
 def test_ask_for_more_lines(self):
     result = utils._read_file_chunk(self.testfile, 30)
     expected = self.lines
     self.assertEqual(result, expected)
Пример #3
0
 def test_read_three(self):
     result = utils._read_file_chunk(self.testfile, 3)
     expected = self.lines[:3]
     self.assertEqual(result, expected)