<s> """<STR_LIT>""" <EOL> from __future__ import division , absolute_import <EOL> import warnings <EOL> from twisted . trial import unittest , util <EOL> METHOD_WARNING_MSG = "<STR_LIT>" <EOL> CLASS_WARNING_MSG = "<STR_LIT>" <EOL> MODULE_WARNING_MSG = "<STR_LIT>" <EOL> class MethodWarning ( Warning ) : <EOL> pass <EOL> class ClassWarning ( Warning ) : <EOL> pass <EOL> class ModuleWarning ( Warning ) : <EOL> pass <EOL> class EmitMixin : <EOL> def _emit ( self ) : <EOL> warnings . warn ( METHOD_WARNING_MSG , MethodWarning ) <EOL> warnings . warn ( CLASS_WARNING_MSG , ClassWarning ) <EOL> warnings . warn ( MODULE_WARNING_MSG , ModuleWarning ) <EOL> class SuppressionMixin ( EmitMixin ) : <EOL> suppress = [ util . suppress ( message = CLASS_WARNING_MSG ) ] <EOL> def testSuppressMethod ( self ) : <EOL> self . _emit ( ) <EOL> testSuppressMethod . suppress = [ util . suppress ( message = METHOD_WARNING_MSG ) ] <EOL> def testSuppressClass ( self ) : <EOL> self . _emit ( ) <EOL> def testOverrideSuppressClass ( self ) : <EOL> self . _emit ( ) <EOL> testOverrideSuppressClass . suppress = [ ] <EOL> class SetUpSuppressionMixin ( object ) : <EOL> def setUp ( self ) : <EOL> self . _emit ( ) <EOL> class TearDownSuppressionMixin ( object ) : <EOL> def tearDown ( self ) : <EOL> self . _emit ( ) <EOL> class TestSuppression2Mixin ( EmitMixin ) : <EOL> def testSuppressModule ( self ) : <EOL> self . _emit ( ) <EOL> suppress = [ util . suppress ( message = MODULE_WARNING_MSG ) ] <EOL> class SynchronousTestSuppression ( SuppressionMixin , unittest . SynchronousTestCase ) : <EOL> pass <EOL> class SynchronousTestSetUpSuppression ( SetUpSuppressionMixin , SynchronousTestSuppression ) : <EOL> pass <EOL> class SynchronousTestTearDownSuppression ( TearDownSuppressionMixin , SynchronousTestSuppression ) : <EOL> pass <EOL> class SynchronousTestSuppression2 ( TestSuppression2Mixin , unittest . SynchronousTestCase ) : <EOL> pass <EOL> class AsynchronousTestSuppression ( SuppressionMixin , unittest . TestCase ) : <EOL> pass <EOL> class AsynchronousTestSetUpSuppression ( SetUpSuppressionMixin , AsynchronousTestSuppression ) : <EOL> pass <EOL> class AsynchronousTestTearDownSuppression ( TearDownSuppressionMixin , AsynchronousTestSuppression ) : <EOL> pass <EOL> class AsynchronousTestSuppression2 ( TestSuppression2Mixin , unittest . TestCase ) : <EOL> pass </s>
