'Test it respect the limit on the number of files when maxRotatedFiles
is not None.'

def test_maxNumberOfLog(self):

    log = logfile.LogFile(self.name, self.dir, rotateLength=10, maxRotatedFiles=3)
    self.addCleanup(log.close)
    log.write(('1' * 11))
    log.write(('2' * 11))
    self.assertTrue(os.path.exists('{0}.1'.format(self.path)))
    log.write(('3' * 11))
    self.assertTrue(os.path.exists('{0}.2'.format(self.path)))
    log.write(('4' * 11))
    self.assertTrue(os.path.exists('{0}.3'.format(self.path)))
    with open('{0}.3'.format(self.path)) as fp:
        self.assertEqual(fp.read(), ('1' * 11))
    log.write(('5' * 11))
    with open('{0}.3'.format(self.path)) as fp:
        self.assertEqual(fp.read(), ('2' * 11))
    self.assertFalse(os.path.exists('{0}.4'.format(self.path)))
