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

  • Committer: John Arbash Meinel
  • Date: 2009-12-03 19:54:38 UTC
  • mto: This revision was merged to the branch mainline in revision 4877.
  • Revision ID: john@arbash-meinel.com-20091203195438-1iaq16e9tmx4edc2
We don't need the utf8 option, no test actually wanted to run without it,
it was just written the 'easy' way.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 
43
43
    def assertFormatterResult(self, result, branch, formatter_class,
44
44
                              formatter_kwargs=None, show_log_kwargs=None,
45
 
                              normalize=False, utf8=True):
46
 
        if utf8:
47
 
            logfile = self.make_utf8_encoded_stringio()
48
 
        else:
49
 
            logfile = StringIO()
 
45
                              normalize=False):
 
46
        logfile = self.make_utf8_encoded_stringio()
50
47
        if formatter_kwargs is None:
51
48
            formatter_kwargs = {}
52
49
        formatter = formatter_class(to_file=logfile, **formatter_kwargs)
510
507
  a
511
508
''',
512
509
            wt.branch, log.LongLogFormatter,
513
 
            show_log_kwargs=dict(verbose=True),
514
 
            utf8=False)
 
510
            show_log_kwargs=dict(verbose=True))
515
511
 
516
512
    def test_merges_are_indented_by_level(self):
517
513
        wt = self.make_branch_and_tree('parent')
669
665
message:
670
666
  add a
671
667
""",
672
 
        wt.branch, log.LongLogFormatter, utf8=False)
 
668
        wt.branch, log.LongLogFormatter)
673
669
 
674
670
    def test_properties_in_log(self):
675
671
        """Log includes the custom properties returned by the registered
694
690
message:
695
691
  add a
696
692
""",
697
 
            wt.branch, log.LongLogFormatter, utf8=False)
 
693
            wt.branch, log.LongLogFormatter)
698
694
 
699
695
    def test_properties_in_short_log(self):
700
696
        """Log includes the custom properties returned by the registered
721
717
        """
722
718
        wt = self.make_standard_commit('error_in_properties_handler',
723
719
            revprops={'first_prop':'first_value'})
724
 
        sio = StringIO()
 
720
        sio = self.make_utf8_encoded_stringio()
725
721
        formatter = log.LongLogFormatter(to_file=sio)
726
722
        def trivial_custom_prop_handler(revision):
727
723
            raise StandardError("a test error")
734
730
    def test_properties_handler_bad_argument(self):
735
731
        wt = self.make_standard_commit('bad_argument',
736
732
              revprops={'a_prop':'test_value'})
737
 
        sio = StringIO()
 
733
        sio = self.make_utf8_encoded_stringio()
738
734
        formatter = log.LongLogFormatter(to_file=sio)
739
735
        def bad_argument_prop_handler(revision):
740
736
            return {'custom_prop_name':revision.properties['a_prop']}
773
769
""",
774
770
            wt.branch, log.LongLogFormatter,
775
771
            formatter_kwargs=dict(levels=1),
776
 
            show_log_kwargs=dict(verbose=True),
777
 
            utf8=False)
 
772
            show_log_kwargs=dict(verbose=True))
778
773
 
779
774
    def test_long_verbose_contain_deltas(self):
780
775
        wt = self.make_branch_and_tree('parent')