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

Method test_splitvalue

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

Source from the content-addressed store, hash-verified

1655 self.assertEqual(splitattr('/path'), ('/path', []))
1656
1657 def test_splitvalue(self):
1658 # Normal cases are exercised by other tests; test pathological cases
1659 # with no key/value pairs. (testcase ensuring coverage)
1660 splitvalue = urllib.parse._splitvalue
1661 self.assertEqual(splitvalue('foo=bar'), ('foo', 'bar'))
1662 self.assertEqual(splitvalue('foo='), ('foo', ''))
1663 self.assertEqual(splitvalue('=bar'), ('', 'bar'))
1664 self.assertEqual(splitvalue('foobar'), ('foobar', None))
1665 self.assertEqual(splitvalue('foo=bar=baz'), ('foo', 'bar=baz'))
1666
1667 def test_to_bytes(self):
1668 result = urllib.parse._to_bytes('http://www.python.org')

Callers

nothing calls this directly

Calls 2

splitvalueFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected