~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_delta.py

  • Committer: Andrew Starr-Bochicchio
  • Date: 2015-07-31 01:04:41 UTC
  • mto: This revision was merged to the branch mainline in revision 6606.
  • Revision ID: a.starr.b@gmail.com-20150731010441-3domwjjtnjijxlr2
Use hexlify() from binascii directly as paramiko removed hexify().

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        reporter.report(file_id, (old_path, path), versioned_change, renamed,
66
66
            modified, exe_change, kind)
67
67
        if expected_lines is not None:
68
 
            for i in range(len(expected_lines)):
69
 
                self.assertEqualDiff(expected_lines[i], result[i])
 
68
            self.assertEqualDiff('\n'.join(expected_lines), '\n'.join(result))
70
69
        else:
71
70
            self.assertEqual([], result)
72
71
 
123
122
            renamed=False, modified='created', exe_change=False,
124
123
            kind=(None, 'file'), unversioned_filter=lambda x:True)
125
124
 
 
125
    def test_missing(self):
 
126
        self.assertReport('+!  missing.c', file_id=None, path='missing.c',
 
127
             old_path=None, versioned_change='added',
 
128
             renamed=False, modified='missing', exe_change=False,
 
129
             kind=(None, None))
 
130
 
126
131
    def test_view_filtering(self):
127
132
        # If a file in within the view, it should appear in the output
128
133
        expected_lines = [
280
285
                                  ('branch/f2', '2\n'),
281
286
                                  ('branch/f3', '3\n'),
282
287
                                  ('branch/f4', '4\n'),
 
288
                                  ('branch/f5', '5\n'),
283
289
                                  ('branch/dir/',),
284
290
                                 ])
285
291
        wt.add(['f1', 'f2', 'f3', 'f4', 'dir'],
286
292
               ['f1-id', 'f2-id', 'f3-id', 'f4-id', 'dir-id'])
287
293
        wt.commit('commit one', rev_id='1')
288
294
 
 
295
        # TODO add rename,removed,etc. here?
 
296
        wt.add('f5')
 
297
        os.unlink('branch/f5')
 
298
 
289
299
        long_status = """added:
290
300
  dir/
291
301
  f1
292
302
  f2
293
303
  f3
294
304
  f4
 
305
missing:
 
306
  f5
295
307
"""
296
308
        short_status = """A  dir/
297
309
A  f1
298
310
A  f2
299
311
A  f3
300
312
A  f4
 
313
!  f5
301
314
"""
302
315
 
303
316
        repo = wt.branch.repository