MCPcopy Index your code
hub / github.com/python/cpython / test_splituser

Method test_splituser

Lib/test/test_urlparse.py:1801–1812  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1799 ('example.net', '/file#'))
1800
1801 def test_splituser(self):
1802 splituser = urllib.parse._splituser
1803 self.assertEqual(splituser('User:Pass@www.python.org:080'),
1804 ('User:Pass', 'www.python.org:080'))
1805 self.assertEqual(splituser('@www.python.org:080'),
1806 ('', 'www.python.org:080'))
1807 self.assertEqual(splituser('www.python.org:080'),
1808 (None, 'www.python.org:080'))
1809 self.assertEqual(splituser('User:Pass@'),
1810 ('User:Pass', ''))
1811 self.assertEqual(splituser('User@example.com:Pass@www.python.org:080'),
1812 ('User@example.com:Pass', 'www.python.org:080'))
1813
1814 def test_splitpasswd(self):
1815 # Some of the password examples are not sensible, but it is added to

Callers

nothing calls this directly

Calls 2

splituserFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected