/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 breezy/tests/test__annotator.py

  • Committer: Jelmer Vernooij
  • Date: 2018-05-22 02:05:12 UTC
  • mto: (6973.12.2 python3-k)
  • mto: This revision was merged to the branch mainline in revision 6992.
  • Revision ID: jelmer@jelmer.uk-20180522020512-btpj2jchdlehi3en
Add more bees.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2009, 2010, 2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
16
16
 
17
17
"""Tests for Annotators."""
18
18
 
19
 
from bzrlib import (
 
19
from .. import (
20
20
    annotate,
21
 
    _annotator_py,
22
21
    errors,
23
 
    knit,
24
22
    revision,
25
23
    tests,
26
24
    )
27
25
 
28
 
 
29
 
def load_tests(standard_tests, module, loader):
 
26
from ..bzr import (
 
27
    knit,
 
28
    )
 
29
 
 
30
 
 
31
def load_tests(loader, standard_tests, pattern):
30
32
    """Parameterize tests for all versions of groupcompress."""
31
33
    suite, _ = tests.permute_tests_for_extension(standard_tests, loader,
32
 
        'bzrlib._annotator_py', 'bzrlib._annotator_pyx')
 
34
        'breezy._annotator_py', 'breezy._annotator_pyx')
33
35
    return suite
34
36
 
35
37
 
138
140
        annotation, lines = self.ann.annotate(key)
139
141
        self.assertEqual(expected_annotation, annotation)
140
142
        if exp_text is None:
141
 
            record = self.vf.get_record_stream([key], 'unordered', True).next()
 
143
            record = next(self.vf.get_record_stream([key], 'unordered', True))
142
144
            exp_text = record.get_bytes_as('fulltext')
143
145
        self.assertEqualDiff(exp_text, ''.join(lines))
144
146