# Path: tensor/logs/parsers.py
# class ApacheLogParserError(Exception):
# class ApacheLogParser:
#     def __init__(self, format):
#     def _parse_date(self, date):
#     def alias(self, field):
#     def _parse_format(self, format):
#     def parse(self, line):
#     def pattern(self):
#     def names(self):


from twisted.trial import unittest
from tensor.logs import follower, parsers
import datetime
import os
        self.assertEqual(r2, [])
        self.assertEqual(r3[0], 'testing')

        log.close()

        # Move inode
        os.rename('test.log', 'testold.log')

        log = open('test.log', 'wt')
        log.write('foo2\nbar2\n')
        log.close()

        r = f.get()

        self.assertEqual(r[0], 'foo2')
        self.assertEqual(r[1], 'bar2')

        # Go backwards
        log = open('test.log', 'wt')
        log.write('foo3\n')
        log.close()

        r = f.get()

        self.assertEqual(r[0], 'foo3')

        os.unlink('test.log')
        os.unlink('testold.log')

    def test_apache_parser(self):

# Path: tensor/logs/parsers.py
# class ApacheLogParserError(Exception):
# class ApacheLogParser:
#     def __init__(self, format):
#     def _parse_date(self, date):
#     def alias(self, field):
#     def _parse_format(self, format):
#     def parse(self, line):
#     def pattern(self):
#     def names(self):


# Path: tensor/tests/test_logs.py
from twisted.trial import unittest
from tensor.logs import follower, parsers
import datetime
import os

        self.assertEqual(r2, [])
        self.assertEqual(r3[0], 'testing')

        log.close()

        # Move inode
        os.rename('test.log', 'testold.log')

        log = open('test.log', 'wt')
        log.write('foo2\nbar2\n')
        log.close()

        r = f.get()

        self.assertEqual(r[0], 'foo2')
        self.assertEqual(r[1], 'bar2')

        # Go backwards
        log = open('test.log', 'wt')
        log.write('foo3\n')
        log.close()

        r = f.get()

        self.assertEqual(r[0], 'foo3')

        os.unlink('test.log')
        os.unlink('testold.log')

    def test_apache_parser(self):

        log = parsers.ApacheLogParser('combined')