1
# Copyright 2010-2011 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
8
from cStringIO import StringIO
10
from unittest import (
15
from lpresults.xunit.parsers.ansi import (
21
class TestAnsiParser(TestCase):
23
def getParser(self, string):
24
stream = StringIO(string)
25
return AnsiParser(stream)
27
def getResult(self, string):
28
parser = self.getParser(string)
33
def test_escape(self):
34
result = self.getResult("[[33mSKIP]")
35
self.assertEquals(result.text, "[SKIP]")
39
return defaultTestLoader.loadTestsFromName(__name__)