'L{logfile.LogFile.reopen} allows to rename the currently used file and
make L{logfile.LogFile} create a new file.'

def test_reopen(self):

    with contextlib.closing(logfile.LogFile(self.name, self.dir)) as log1:
        log1.write('hello1')
        savePath = os.path.join(self.dir, 'save.log')
        os.rename(self.path, savePath)
        log1.reopen()
        log1.write('hello2')
    with open(self.path) as f:
        self.assertEqual(f.read(), 'hello2')
    with open(savePath) as f:
        self.assertEqual(f.read(), 'hello1')
