/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_status.py

  • Committer: Andrew Bennetts
  • Date: 2011-06-02 07:25:33 UTC
  • mfrom: (5952 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5955.
  • Revision ID: andrew.bennetts@canonical.com-20110602072533-v0pe1ivh27cp0pd8
MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
324
324
        wt.add('FILE_D')
325
325
        wt.add('FILE_E')
326
326
        wt.commit('Create five empty files.')
327
 
        open('FILE_B', 'w').write('Modification to file FILE_B.')
328
 
        open('FILE_C', 'w').write('Modification to file FILE_C.')
 
327
        with open('FILE_B', 'w') as f: f.write('Modification to file FILE_B.')
 
328
        with open('FILE_C', 'w') as f: f.write('Modification to file FILE_C.')
329
329
        unlink('FILE_E')  # FILE_E will be versioned but missing
330
 
        open('FILE_Q', 'w').write('FILE_Q is added but not committed.')
 
330
        with open('FILE_Q', 'w') as f: f.write('FILE_Q is added but not committed.')
331
331
        wt.add('FILE_Q')  # FILE_Q will be added but not committed
332
332
        open('UNVERSIONED_BUT_EXISTING', 'w')
333
333
        return wt
477
477
          ' M  FILE_B\n',
478
478
          'X   NONEXISTENT\n',
479
479
          ]
 
480
        expected.sort()
480
481
        out, err = self.run_bzr('status --short NONEXISTENT '
481
482
                                'FILE_A FILE_B UNVERSIONED_BUT_EXISTING '
482
483
                                'FILE_C FILE_D FILE_E FILE_Q', retcode=3)
483
 
        self.assertEqual(expected, out.splitlines(True))
 
484
        actual = out.splitlines(True)
 
485
        actual.sort()
 
486
        self.assertEqual(expected, actual)
484
487
        self.assertContainsRe(err,
485
488
                              r'.*ERROR: Path\(s\) do not exist: '
486
489
                              'NONEXISTENT.*')