'L{FilePath.moveTo} clears its destination\'s status cache, such that
calls to L{FilePath.getsize} after the call to C{moveTo} will report the
new size, not the old one.
This is a separate test from C{test_moveToExistsCache} because it is
intended to cover the fact that the destination\'s cache is dropped;
test_moveToExistsCache doesn\'t cover this case because (currently) a
file that doesn\'t exist yet does not cache the fact of its non-
existence.'

def test_moveToSizeCache(self, hook=(lambda : None)):

    fp = filepath.FilePath(self.mktemp())
    fp2 = filepath.FilePath(self.mktemp())
    fp.setContent('1234')
    fp2.setContent('1234567890')
    hook()
    self.assertEqual(fp.getsize(), 4)
    self.assertEqual(fp2.getsize(), 10)
    os.remove(fp2.path)
    self.assertEqual(fp2.getsize(), 10)
    fp.moveTo(fp2)
    self.assertEqual(fp2.getsize(), 4)
