~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_symbol_versioning.py

Move working tree initialisation out from  Branch.initialize, deprecated Branch.initialize to Branch.create.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
class TestDeprecationWarnings(TestCase):
31
31
 
32
 
    def capture_warning(self, message, category):
33
 
        self._warnings.append((message, category))
 
32
    def capture_warning(self, message, category, stacklevel=None):
 
33
        self._warnings.append((message, category, stacklevel))
34
34
 
35
35
    def setUp(self):
36
36
        super(TestDeprecationWarnings, self).setUp()
48
48
        expected_warning = (
49
49
            "bzrlib.tests.test_symbol_versioning."
50
50
            "TestDeprecationWarnings.deprecated_method "
51
 
            "was deprecated in version 0.7.", DeprecationWarning)
 
51
            "was deprecated in version 0.7.", DeprecationWarning, 2)
52
52
        expected_docstring = ('Deprecated method docstring.\n'
53
53
                              '        \n'
54
54
                              '        This might explain stuff.\n'
63
63
    def test_deprecated_function(self):
64
64
        expected_warning = (
65
65
            "bzrlib.tests.test_symbol_versioning.deprecated_function "
66
 
            "was deprecated in version 0.7.", DeprecationWarning)
 
66
            "was deprecated in version 0.7.", DeprecationWarning, 2)
67
67
        expected_docstring = ('Deprecated function docstring.\n'
68
68
                              '\n'
69
69
                              'This function was deprecated in version 0.7.\n'