MCPcopy Create free account
hub / github.com/RustPython/RustPython / test_splituser

Method test_splituser

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

Source from the content-addressed store, hash-verified

1567 ('example.net', '/file#'))
1568
1569 def test_splituser(self):
1570 splituser = urllib.parse._splituser
1571 self.assertEqual(splituser('User:Pass@www.python.org:080'),
1572 ('User:Pass', 'www.python.org:080'))
1573 self.assertEqual(splituser('@www.python.org:080'),
1574 ('', 'www.python.org:080'))
1575 self.assertEqual(splituser('www.python.org:080'),
1576 (None, 'www.python.org:080'))
1577 self.assertEqual(splituser('User:Pass@'),
1578 ('User:Pass', ''))
1579 self.assertEqual(splituser('User@example.com:Pass@www.python.org:080'),
1580 ('User@example.com:Pass', 'www.python.org:080'))
1581
1582 def test_splitpasswd(self):
1583 # 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