~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/blackbox.py

  • Committer: Robert Collins
  • Date: 2005-09-26 08:56:15 UTC
  • mto: (1092.3.4)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: robertc@robertcollins.net-20050926085615-99b8fb35f41b541d
massive patch from Alexander Belchenko - many PEP8 fixes, removes unused function uuid

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
"""
28
28
 
29
29
from cStringIO import StringIO
 
30
import os
30
31
import sys
31
 
import os
32
32
 
33
33
from bzrlib.selftest import TestCaseInTempDir, BzrTestBase
34
34
from bzrlib.branch import Branch
123
123
        self.assertEquals(list(b.unknowns()), ['foo.blah'])
124
124
        self.runbzr('ignore *.blah')
125
125
        self.assertEquals(list(b.unknowns()), [])
126
 
        assert file('.bzrignore', 'rb').read() == '*.blah\n'
 
126
        assert file('.bzrignore', 'rU').read() == '*.blah\n'
127
127
 
128
128
        # 'ignore' works when then .bzrignore file already exists
129
129
        file('garh', 'wt').write('garh')
131
131
        assert self.capture('unknowns') == 'garh\n'
132
132
        self.runbzr('ignore garh')
133
133
        self.assertEquals(list(b.unknowns()), [])
134
 
        assert file('.bzrignore', 'rb').read() == '*.blah\ngarh\n'
 
134
        assert file('.bzrignore', 'rU').read() == '*.blah\ngarh\n'
135
135
 
136
136
    def test_revert(self):
137
137
        self.runbzr('init')
297
297
        # the ordering is not defined at the moment
298
298
        results = sorted(out.rstrip('\n').split('\n'))
299
299
        self.assertEquals(['added dir',
300
 
                           'added dir/sub.txt',
 
300
                           'added dir'+os.sep+'sub.txt',
301
301
                           'added top.txt',],
302
302
                          results)
303
303