'Logfiles are rotated when they reach 100MiB.'

def test_file_logging_rotation_at_100MiB(self):

    logfile = FilePath(self.mktemp()).child('foo.log')
    logfile.parent().makedirs()
    with logfile.open('w') as f:
        f.truncate(int((MiB(100).to_Byte().value - 1)))
    d = self.run_script(EliotScript, options=['--logfile', logfile.path])
    def verify_logfiles(stdout_messages, logfile):
        self.assertEqual(set([logfile, logfile.sibling((logfile.basename() + u'.1'))]), set(logfile.parent().children()))
    d.addCallback(verify_logfiles, logfile=logfile)
    return d
