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

Method test_splitattr

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

Source from the content-addressed store, hash-verified

1878 ('http://example.com?foo=bar#baz', 'boo'))
1879
1880 def test_splitattr(self):
1881 splitattr = urllib.parse._splitattr
1882 self.assertEqual(splitattr('/path;attr1=value1;attr2=value2'),
1883 ('/path', ['attr1=value1', 'attr2=value2']))
1884 self.assertEqual(splitattr('/path;'), ('/path', ['']))
1885 self.assertEqual(splitattr(';attr1=value1;attr2=value2'),
1886 ('', ['attr1=value1', 'attr2=value2']))
1887 self.assertEqual(splitattr('/path'), ('/path', []))
1888
1889 def test_splitvalue(self):
1890 # Normal cases are exercised by other tests; test pathological cases

Callers

nothing calls this directly

Calls 2

splitattrFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected