~ed.so/duplicity/reuse-passphrase-for-signing-fix

« back to all changes in this revision

Viewing changes to testing/pathtest.py

  • Committer: Larry Gilbert
  • Date: 2009-08-15 05:39:30 UTC
  • mto: This revision was merged to the branch mainline in revision 597.
  • Revision ID: larry+launchpad@l2g.to-20090815053930-erk3yhisfbphhcv1
Changed options to 'cp' to be compatible with BSD style yet (hopefully)
stay compatible with GNU

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