def test_userinfo(self):
        """
        L{URL.from_text} will parse the C{userinfo} portion of the URI
        separately from the host and port.
        """
        url = URL.from_text(
            'http://someuser:somepassword@example.com/some-segment@ignore'
        )
        self.assertEqual(url.authority(True),
                         'someuser:somepassword@example.com')
        self.assertEqual(url.authority(False), 'someuser:@example.com')
        self.assertEqual(url.userinfo, 'someuser:somepassword')
        self.assertEqual(url.user, 'someuser')
        self.assertEqual(url.to_text(),
                         'http://someuser:@example.com/some-segment@ignore')
        self.assertEqual(
            url.replace(userinfo=u"someuser").to_text(),
            'http://someuser@example.com/some-segment@ignore'
        )

        L{URL.from_text} will parse the C{userinfo} portion of the URI
        separately from the host and port.
        
stackoverflow/venv/lib/python3.6/site-packages/hyperlink/test/test_url.py