MCPcopy Index your code
hub / github.com/bpython/bpython / test_decode

Method test_decode

bpython/test/test_line_properties.py:113–122  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

111 self.assertEqual(cursor("asd|fgh"), (3, "asdfgh"))
112
113 def test_decode(self):
114 self.assertEqual(
115 decode("a<bd|c>d"), ((3, "abdcd"), LinePart(1, 4, "bdc"))
116 )
117 self.assertEqual(
118 decode("a|<bdc>d"), ((1, "abdcd"), LinePart(1, 4, "bdc"))
119 )
120 self.assertEqual(
121 decode("a<bdc>d|"), ((5, "abdcd"), LinePart(1, 4, "bdc"))
122 )
123
124 def test_encode(self):
125 self.assertEqual(encode(3, "abdcd", LinePart(1, 4, "bdc")), "a<bd|c>d")

Callers

nothing calls this directly

Calls 2

LinePartClass · 0.90
decodeFunction · 0.85

Tested by

no test coverage detected