MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_splitport

Method test_splitport

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

Source from the content-addressed store, hash-verified

1598 self.assertEqual(splitpasswd(':ab'), ('', 'ab'))
1599
1600 def test_splitport(self):
1601 splitport = urllib.parse._splitport
1602 self.assertEqual(splitport('parrot:88'), ('parrot', '88'))
1603 self.assertEqual(splitport('parrot'), ('parrot', None))
1604 self.assertEqual(splitport('parrot:'), ('parrot', None))
1605 self.assertEqual(splitport('127.0.0.1'), ('127.0.0.1', None))
1606 self.assertEqual(splitport('parrot:cheese'), ('parrot:cheese', None))
1607 self.assertEqual(splitport('[::1]:88'), ('[::1]', '88'))
1608 self.assertEqual(splitport('[::1]'), ('[::1]', None))
1609 self.assertEqual(splitport(':88'), ('', '88'))
1610
1611 def test_splitnport(self):
1612 splitnport = urllib.parse._splitnport

Callers

nothing calls this directly

Calls 2

splitportFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected