Ticket #3427 defect closed fixed
twisted.trial.test.test_assertions.TestCallDeprecated.test_callDeprecatedSuppressesWarning overrides warnings.warn_explicit to catch emitted warnings
|Reported by:||exarkun||Owned by:|
This test tries to assert that no warnings are emitted when callDeprecated is used to call a function which emits a deprecation warning. It replaces warnings.warn_explicit for the duration of the test and expects to be able to observe warnings through its replacement. In Python 2.6, this strategy will not work. The test should likely use the strategy used in the implementation of TestCase.assertWarns (which perhaps should be factored into a general API, at least for internal-trial use).