~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_symbol_versioning.py

  • Committer: Vincent Ladeuil
  • Date: 2012-03-09 16:48:55 UTC
  • mto: (6437.23.24 2.5)
  • mto: This revision was merged to the branch mainline in revision 6499.
  • Revision ID: v.ladeuil+lp@free.fr-20120309164855-htdn25hp7x65mmir
Rely on sphinx for texinfo doc generation

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006-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
22
22
from bzrlib.symbol_versioning import (
23
23
    deprecated_function,
24
24
    deprecated_in,
25
 
    deprecated_list,
26
25
    deprecated_method,
27
26
    )
28
27
from bzrlib.tests import TestCase
241
240
        symbol_versioning.suppress_deprecation_warnings()
242
241
        self.assertFirstWarning('ignore', DeprecationWarning)
243
242
 
 
243
    def test_set_restore_filters(self):
 
244
        original_filters = warnings.filters[:]
 
245
        symbol_versioning.suppress_deprecation_warnings()()
 
246
        self.assertEqual(original_filters, warnings.filters)
 
247
 
244
248
    def test_suppress_deprecation_with_warning_filter(self):
245
249
        """don't suppress if we already have a filter"""
246
250
        warnings.filterwarnings('error', category=Warning)