~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_symbol_versioning.py

  • Committer: John Arbash Meinel
  • Date: 2007-05-04 18:59:36 UTC
  • mto: This revision was merged to the branch mainline in revision 2643.
  • Revision ID: john@arbash-meinel.com-20070504185936-1mjdoqmtz74xe5mg
A C implementation of _fields_to_entry_0_parents drops the time from 400ms to 330ms for a 21k-entry tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2006, 2007 Canonical Ltd
2
2
#   Authors: Robert Collins <robert.collins@canonical.com>
3
 
#   and others
4
3
#
5
4
# This program is free software; you can redistribute it and/or modify
6
5
# it under the terms of the GNU General Public License as published by
57
56
        """
58
57
        return 1
59
58
 
60
 
    @staticmethod
61
 
    @symbol_versioning.deprecated_function(symbol_versioning.zero_seven)
62
 
    def deprecated_static():
63
 
        """Deprecated static."""
64
 
        return 1
65
 
 
66
 
    def test_deprecated_static(self):
67
 
        # XXX: The results are not quite right because the class name is not
68
 
        # shown - however it is enough to give people a good indication of
69
 
        # where the problem is.
70
 
        expected_warning = (
71
 
            "bzrlib.tests.test_symbol_versioning."
72
 
            "deprecated_static "
73
 
            "was deprecated in version 0.7.", DeprecationWarning, 2)
74
 
        expected_docstring = (
75
 
            'Deprecated static.\n'
76
 
            '\n'
77
 
            'This function was deprecated in version 0.7.\n'
78
 
            )
79
 
        self.check_deprecated_callable(
80
 
            expected_warning, expected_docstring,
81
 
            "deprecated_static",
82
 
            "bzrlib.tests.test_symbol_versioning",
83
 
            self.deprecated_static)
84
 
 
85
59
    def test_deprecated_method(self):
86
60
        expected_warning = (
87
61
            "bzrlib.tests.test_symbol_versioning."