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

Method test_splitvalue

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

Source from the content-addressed store, hash-verified

1887 self.assertEqual(splitattr('/path'), ('/path', []))
1888
1889 def test_splitvalue(self):
1890 # Normal cases are exercised by other tests; test pathological cases
1891 # with no key/value pairs. (testcase ensuring coverage)
1892 splitvalue = urllib.parse._splitvalue
1893 self.assertEqual(splitvalue('foo=bar'), ('foo', 'bar'))
1894 self.assertEqual(splitvalue('foo='), ('foo', ''))
1895 self.assertEqual(splitvalue('=bar'), ('', 'bar'))
1896 self.assertEqual(splitvalue('foobar'), ('foobar', None))
1897 self.assertEqual(splitvalue('foo=bar=baz'), ('foo', 'bar=baz'))
1898
1899 def test_to_bytes(self):
1900 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