~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Lukáš Lalinský
  • Date: 2007-12-18 15:23:12 UTC
  • mto: (3123.3.1 Aaron's integration)
  • mto: This revision was merged to the branch mainline in revision 3125.
  • Revision ID: lalinsky@gmail.com-20071218152312-njiuw74xml5n421h
Use self.outf instead of sys.stdout in cmd_ignored.
      
This fixes Unicode failures when the output is redirected to something that isn't a terminal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
496
496
        self.run_bzr_decode(['info', self.info['directory']])
497
497
        self.run_bzr_decode(['info', self.info['directory']],
498
498
                            encoding='ascii')
 
499
 
 
500
    def test_ignored(self):
 
501
        fname = self.info['filename'] + '1.txt'
 
502
        self.build_tree_contents([(fname, 'ignored\n')])
 
503
        self.run_bzr(['ignore', fname])
 
504
        txt = self.run_bzr_decode(['ignored'])
 
505
        self.assertEqual(txt, '%-50s %s\n' % (fname, fname))
 
506
        txt = self.run_bzr_decode(['ignored'], encoding='ascii')
 
507
        fname = fname.encode('ascii', 'replace')
 
508
        self.assertEqual(txt, '%-50s %s\n' % (fname, fname))