4 from yaml
.reader
import Mark
6 class TestMark(test_appliance
.TestAppliance
):
8 def _testMarks(self
, test_name
, marks_filename
):
9 inputs
= file(marks_filename
, 'rb').read().split('---\n')[1:]
14 while input[index
] != '*':
15 if input[index
] == '\n':
21 mark
= Mark(test_name
, index
, line
, column
, unicode(input), index
)
22 snippet
= mark
.get_snippet(indent
=2, max_length
=79)
27 self
.failUnless(isinstance(snippet
, str))
28 self
.failUnlessEqual(snippet
.count('\n'), 1)
29 data
, pointer
= snippet
.split('\n')
30 self
.failUnless(len(data
) < 82)
31 self
.failUnlessEqual(data
[len(pointer
)-1], '*')
33 TestMark
.add_tests('testMarks', '.marks')