/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/test_shelf_ui.py

  • Committer: Guilherme Salgado
  • Date: 2010-01-07 14:03:46 UTC
  • mto: This revision was merged to the branch mainline in revision 4955.
  • Revision ID: salgado@canonical.com-20100107140346-3lq4lgspf4dllk9q
Tweak the text to check to assert the meat of the diff is what we expect, instead of just checking it matches some regexps

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
from cStringIO import StringIO
19
19
import os
20
20
import sys
 
21
from textwrap import dedent
21
22
 
22
23
from bzrlib import (
23
24
    errors,
518
519
 
519
520
        # But the diff was written to write_diff_to.
520
521
        diff = write_diff_to.getvalue()
521
 
        self.assertContainsRe(diff, '-a\n\+z')
522
 
        self.assertContainsRe(diff, '-j\n\+y')
 
522
        expected = dedent("""\
 
523
            @@ -1,4 +1,4 @@
 
524
            -a
 
525
            +z
 
526
             b
 
527
             c
 
528
             d
 
529
            @@ -7,4 +7,4 @@
 
530
             g
 
531
             h
 
532
             i
 
533
            -j
 
534
            +y
 
535
 
 
536
            """)
 
537
        self.assertEqualDiff(expected, diff[-len(expected):])
523
538
 
524
539
    def test_unshelve_args_delete_only(self):
525
540
        tree = self.make_branch_and_tree('tree')