Implement a Line class

This commit is contained in:
Kovid Goyal
2016-11-01 18:18:12 +05:30
parent 1566407c3d
commit f3944e6289
6 changed files with 142 additions and 36 deletions

View File

@@ -16,12 +16,13 @@ class TestDataTypes(BaseTest):
def test_line_buf(self):
lb = LineBuf(2, 3)
for y in range(2):
line = lb.line(y)
for x in range(3):
self.ae(lb.text_at(y, x), ' ')
self.ae(line.text_at(x), ' ')
with self.assertRaises(ValueError):
lb.text_at(1, 5)
lb.line(5)
with self.assertRaises(ValueError):
lb.text_at(5, 1)
lb.line(0).text_at(5)
def test_line_ops(self):
t = 'Testing with simple text'