~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart_add.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-15 15:50:31 UTC
  • mto: This revision was merged to the branch mainline in revision 1927.
  • Revision ID: john@arbash-meinel.com-20060815155031-f1480d692d2cf9d2
There is no strict ordering file addition, other than directories are added before child files

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
 
253
253
        wt = self.make_branch_and_tree('.')
254
254
        smart_add_tree(wt, ['.'], action=action)
255
 
        self.assertEqualDiff('added dir1 with id directory-dir1\n'
256
 
                             'added file1 with id file-file1\n'
257
 
                             'added dir1/file2 with id file-dir1%file2\n',
258
 
                             sio.getvalue())
 
255
        # The order of adds is not strictly fixed:
 
256
        sio.seek(0)
 
257
        lines = sorted(sio.readlines())
 
258
        self.assertEqualDiff(['added dir1 with id directory-dir1\n',
 
259
                              'added dir1/file2 with id file-dir1%file2\n',
 
260
                              'added file1 with id file-file1\n',
 
261
                             ], lines)
259
262
        self.assertEqual([('', wt.inventory.root.file_id),
260
263
                          ('dir1', 'directory-dir1'),
261
264
                          ('dir1/file2', 'file-dir1%file2'),