예제 #1
0
test = getrp(b"test")
dir = getrp(b".")
sym = getrp(b"symbolic_link")
nothing = getrp(b"nothing")

target = rpath.RPath(lc, os.path.join(abs_output_dir, b"out"))
out2 = rpath.RPath(lc, os.path.join(abs_output_dir, b"out2"))
out_gz = rpath.RPath(lc, os.path.join(abs_output_dir, b"out.gz"))

Time.setcurtime(1000000000)
Time.setprevtime(999424113)
prevtimestr = b"2001-09-02T02:48:33-07:00"
t_pref = os.path.join(abs_output_dir, b"out.%s" % prevtimestr)
t_diff = os.path.join(abs_output_dir, b"out.%s.diff" % prevtimestr)

Globals.postset_regexp_local("no_compression_regexp",
                             actions.DEFAULT_NOT_COMPRESSED_REGEXP, re.I)


class inctest(unittest.TestCase):
    """Test the incrementRP function"""
    def setUp(self):
        Globals.set('isbackup_writer', 1)
        MakeOutputDir()

    def check_time(self, rp):
        """Make sure that rp is an inc file, and time is Time.prevtime"""
        self.assertTrue(rp.isincfile())
        t = rp.getinctime()
        self.assertEqual(t, Time.prevtime)

    def testreg(self):