def testCtime(self): """Check to see if ctime read, compared""" rp = rpath.RPath(self.lc, self.prefix, ("ctimetest.1", )) rp2 = rpath.RPath(self.lc, self.prefix, ("ctimetest.2", )) rp.touch() rp.chmod(0o700) rpath.copy_with_attribs(rp, rp2) assert rpath.cmp_attribs(rp, rp2) time.sleep(1) rp2.chmod(0o755) rp2.chmod(0o700) rp2.setdata() assert rp2.getctime() > rp.getctime() assert not rpath.cmp_attribs(rp, rp2) rp.delete() rp2.delete()
def testsnapshot(self): """Test making of a snapshot""" Globals.compression = None snap_rp = increment.Increment(rf, sym, target) self.check_time(snap_rp) assert rpath.cmp_attribs(snap_rp, sym) assert rpath.cmp(snap_rp, sym) snap_rp.delete() snap_rp2 = increment.Increment(sym, rf, target) self.check_time(snap_rp2) assert snap_rp2.equal_verbose(rf, check_index=0) assert rpath.cmp(snap_rp2, rf) snap_rp2.delete()
def testsnapshot(self): """Test making of a snapshot""" Globals.compression = None snap_rp = increment.Increment(rf, sym, target) self.check_time(snap_rp) assert rpath.cmp_attribs(snap_rp, sym) assert rpath.cmp(snap_rp, sym) snap_rp.delete() snap_rp2 = increment.Increment(sym, rf, target) self.check_time(snap_rp2) assert snap_rp2.equal_verbose(rf, check_index = 0) assert rpath.cmp(snap_rp2, rf) snap_rp2.delete()