def test_class(self):
        """
        When L{deprecated} is used on a class, instantiations raise a
        L{DeprecationWarning} and class's docstring is updated to inform the
        version in which it was deprecated. C{deprecatedVersion} attribute is
        also set to inform the deprecation version.
        """
        DeprecatedClass()

        self.assertDocstring(
            DeprecatedClass,
            [('Class which is entirely deprecated without having a '
              'replacement.'),
            'Deprecated in Twisted 1.2.3.'],
            )
        DeprecatedClass.deprecatedVersion = Version('Twisted', 1, 2, 3)

        message = (
            'twisted.python.test.test_deprecate.DeprecatedClass '
            'was deprecated in Twisted 1.2.3'
            )
        warnings = self.flushWarnings([self.test_class])
        self.assertEqual(1, len(warnings))
        self.assertEqual(DeprecationWarning, warnings[0]['category'])
        self.assertEqual(message, warnings[0]['message'])

        When L{deprecated} is used on a class, instantiations raise a
        L{DeprecationWarning} and class's docstring is updated to inform the
        version in which it was deprecated. C{deprecatedVersion} attribute is
        also set to inform the deprecation version.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_deprecate.py