~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_parent.py

  • Committer: Robert J. Tanner
  • Date: 2009-04-20 08:37:32 UTC
  • mfrom: (4299 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4300.
  • Revision ID: tanner@real-time.com-20090420083732-bzx919oo7wpmqc2u
[merge] 1.14rc2 back into bzr.dev (Bob Tanner)

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
            #       paths as well? Nobody has complained about it.
72
72
            pass
73
73
        else:
 
74
            b.lock_write()
74
75
            b._set_parent_location('/local/abs/path')
 
76
            b.unlock()
75
77
            self.assertEqual('file:///local/abs/path', b.get_parent())
76
78
 
77
79
    def test_get_invalid_parent(self):
83
85
        # Force the relative path to be something invalid
84
86
        # This should attempt to go outside the filesystem
85
87
        path = ('../'*(n_dirs+5)) + 'foo'
 
88
        b.lock_write()
86
89
        b._set_parent_location(path)
 
90
        b.unlock()
87
91
 
88
92
        # With an invalid branch parent, just return None
89
93
        self.assertRaises(bzrlib.errors.InaccessibleParent, b.get_parent)