ENH: add a check to testTail to assure correct test logic below it

pull/1266/head
Yaroslav Halchenko 2015-12-02 22:53:28 -05:00
parent dd9d1912e8
commit 59da27b9f6
1 changed files with 2 additions and 0 deletions

View File

@ -852,6 +852,8 @@ class GetFailures(LogCaptureTestCase):
LogCaptureTestCase.tearDown(self)
def testTail(self):
# There must be no containters registered, otherwise [-1] indexing would be wrong
self.assertEqual(self.filter.getLogs(), [])
self.filter.addLogPath(GetFailures.FILENAME_01, tail=True)
self.assertEqual(self.filter.getLogs()[-1].getPos(), 1653)
self.filter.getLogs()[-1].close()