4 from yaml
.reader
import Marker
6 class TestMarker(test_appliance
.TestAppliance
):
8 def _testMarkers(self
, test_name
, markers_filename
):
9 inputs
= file(markers_filename
, 'rb').read().split('---\n')[1:]
14 while input[index
] != '*':
15 if input[index
] == '\n':
21 marker
= Marker(test_name
, line
, column
, unicode(input), index
)
22 snippet
= marker
.get_snippet()
27 self
.failUnless(isinstance(snippet
, str))
28 self
.failUnlessEqual(snippet
.count('\n'), 2)
29 data
, pointer
, dummy
= snippet
.split('\n')
30 self
.failUnless(len(data
) < 80)
31 self
.failUnlessEqual(data
[len(pointer
)-1], '*')
33 TestMarker
.add_tests('testMarkers', '.markers')