~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: 2008-05-28 23:13:30 UTC
  • mto: This revision was merged to the branch mainline in revision 3458.
  • Revision ID: john@arbash-meinel.com-20080528231330-k9ger42pvc1eiw1l
remove the parameter from activate, and just have it always False

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
        self.assertFirstWarning('ignore', DeprecationWarning)
250
250
        self.assertEqual(1, len(warnings.filters))
251
251
 
252
 
    def test_activate_deprecation_warnings(self):
253
 
        symbol_versioning.activate_deprecation_warnings(always=True)
254
 
        self.assertFirstWarning('default', DeprecationWarning)
255
 
 
256
252
    def test_activate_deprecation_no_error(self):
257
253
        # First nuke the filters, so we know it is clean
258
 
        symbol_versioning.activate_deprecation_warnings(always=False)
 
254
        symbol_versioning.activate_deprecation_warnings()
259
255
        self.assertFirstWarning('default', DeprecationWarning)
260
256
 
261
257
    def test_activate_deprecation_with_error(self):
264
260
        warnings.filterwarnings('error', category=Warning)
265
261
        self.assertFirstWarning('error', Warning)
266
262
        self.assertEqual(1, len(warnings.filters))
267
 
        symbol_versioning.activate_deprecation_warnings(always=False)
 
263
        symbol_versioning.activate_deprecation_warnings()
268
264
        # There should not be a new warning
269
265
        self.assertFirstWarning('error', Warning)
270
266
        self.assertEqual(1, len(warnings.filters))
275
271
        warnings.filterwarnings('error', category=DeprecationWarning)
276
272
        self.assertFirstWarning('error', DeprecationWarning)
277
273
        self.assertEqual(1, len(warnings.filters))
278
 
        symbol_versioning.activate_deprecation_warnings(always=False)
 
274
        symbol_versioning.activate_deprecation_warnings()
279
275
        # There should not be a new warning
280
276
        self.assertFirstWarning('error', DeprecationWarning)
281
277
        self.assertEqual(1, len(warnings.filters))