~mterry/duplicity/list-old-chains-0.6

« back to all changes in this revision

Viewing changes to testing/pathtest.py

  • Committer: Kenneth Loafman
  • Date: 2009-08-28 14:09:41 UTC
  • mfrom: (594.1.8 test-compat)
  • Revision ID: kenneth@loafman.com-20090828140941-wl54fo2xh0xlz3z2
Merged in ~l2g/duplicity/test-compat from Larry Gilbert which made
the testing compatible across more systems.  Also fixed the remaining
collectionstest bug which was trying to test with no cache present.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    def test_deltree(self):
40
40
        """Test deleting a tree"""
41
41
        assert not os.system("rm -rf testfiles/output")
42
 
        assert not os.system("cp -a testfiles/deltree testfiles/output")
 
42
        assert not os.system("cp -pR testfiles/deltree testfiles/output")
43
43
        p = Path("testfiles/output")
44
44
        assert p.isdir()
45
45
        p.deltree()
48
48
    def test_compare(self):
49
49
        """Test directory comparisons"""
50
50
        assert not os.system("rm -rf testfiles/output")
51
 
        assert not os.system("cp -a testfiles/dir1 testfiles/output")
 
51
        assert not os.system("cp -pR testfiles/dir1 testfiles/output")
52
52
        assert Path("testfiles/dir1").compare_recursive(Path("testfiles/output"), 1)
53
53
        assert not Path("testfiles/dir1").compare_recursive(Path("testfiles/dir2"), 1)
54
54