def test_urlDeprecation(self):
        """
        L{twisted.python.url} is deprecated since Twisted 17.5.0.
        """
        from twisted.python import url
        url

        warningsShown = self.flushWarnings([self.test_urlDeprecation])
        self.assertEqual(1, len(warningsShown))
        self.assertEqual(
            ("twisted.python.url was deprecated in Twisted 17.5.0:"
             " Please use hyperlink from PyPI instead."),
            warningsShown[0]['message'])

        L{twisted.python.url} is deprecated since Twisted 17.5.0.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/test/test_url.py