def test_getDeprecationDocstring(self):
     """
     L{_getDeprecationDocstring} returns a note about the deprecation to go
     into a docstring.
     """
     version = Version('Twisted', 8, 0, 0)
     self.assertEqual(
         "Deprecated in Twisted 8.0.0.", _getDeprecationDocstring(version))
Beispiel #2
0
 def test_getDeprecationDocstring(self):
     """
     L{_getDeprecationDocstring} returns a note about the deprecation to go
     into a docstring.
     """
     version = Version('Twisted', 8, 0, 0)
     self.assertEqual("Deprecated in Twisted 8.0.0.",
                      _getDeprecationDocstring(version))
Beispiel #3
0
    def test_deprecatedUpdatesDocstring(self):
        """
        The docstring of the deprecated function is appended with information
        about the deprecation.
        """

        version = Version('Twisted', 8, 0, 0)
        dummy = deprecated(version)(dummyCallable)

        _appendToDocstring(dummyCallable, _getDeprecationDocstring(version))

        self.assertEqual(dummyCallable.__doc__, dummy.__doc__)
    def test_deprecatedUpdatesDocstring(self):
        """
        The docstring of the deprecated function is appended with information
        about the deprecation.
        """

        version = Version('Twisted', 8, 0, 0)
        dummy = deprecated(version)(dummyCallable)

        _appendToDocstring(
            dummyCallable,
            _getDeprecationDocstring(version))

        self.assertEqual(dummyCallable.__doc__, dummy.__doc__)