~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests.py

  • Committer: mbp at sourcefrog
  • Date: 2005-03-22 07:28:45 UTC
  • Revision ID: mbp@sourcefrog.net-20050322072845-5859efd4dab29169
use abspath() for the function that makes an absolute
path to something in a branch or tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
Tests for adding subdirectories, etc.
140
140
 
141
141
    >>> b = bzrlib.branch.ScratchBranch()
142
 
    >>> os.mkdir(b._rel('d1'))
143
 
    >>> os.mkdir(b._rel('d2'))
144
 
    >>> os.mkdir(b._rel('d2/d3'))
 
142
    >>> os.mkdir(b.abspath('d1'))
 
143
    >>> os.mkdir(b.abspath('d2'))
 
144
    >>> os.mkdir(b.abspath('d2/d3'))
145
145
    >>> list(b.working_tree().unknowns())
146
146
    ['d1', 'd2']
147
147
 
148
148
Create some files, but they're not seen as unknown yet:
149
149
 
150
 
    >>> file(b._rel('d1/f1'), 'w').close()
151
 
    >>> file(b._rel('d2/f2'), 'w').close()
152
 
    >>> file(b._rel('d2/f3'), 'w').close()
 
150
    >>> file(b.abspath('d1/f1'), 'w').close()
 
151
    >>> file(b.abspath('d2/f2'), 'w').close()
 
152
    >>> file(b.abspath('d2/f3'), 'w').close()
153
153
    >>> [v[0] for v in b.inventory.directories()]
154
154
    ['']
155
155
    >>> list(b.working_tree().unknowns())