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

  • Committer: John Arbash Meinel
  • Date: 2006-07-11 16:26:34 UTC
  • mto: This revision was merged to the branch mainline in revision 1864.
  • Revision ID: john@arbash-meinel.com-20060711162634-f92a535d5024a703
Add tests to ensure that we gracefully handle opening and trailing non-bundle text.

Show diffs side-by-side

added added

removed removed

Lines of Context:
865
865
        bundle = read_bundle(bundle_txt)
866
866
        self.check_valid(bundle)
867
867
 
 
868
    def test_opening_text(self):
 
869
        bundle_txt = self.build_test_bundle()
 
870
 
 
871
        bundle_txt = StringIO("Some random\nemail comments\n"
 
872
                              + bundle_txt.getvalue())
 
873
 
 
874
        bundle = read_bundle(bundle_txt)
 
875
        self.check_valid(bundle)
 
876
 
 
877
    def test_trailing_text(self):
 
878
        bundle_txt = self.build_test_bundle()
 
879
 
 
880
        bundle_txt = StringIO(bundle_txt.getvalue() +
 
881
                              "Some trailing\nrandom\ntext\n")
 
882
 
 
883
        bundle = read_bundle(bundle_txt)
 
884
        self.check_valid(bundle)
 
885