summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndrew Pinkham <code@andrewsforge.com>2014-05-06 13:08:54 -0500
committerAndrew Pinkham <code@andrewsforge.com>2014-05-06 13:08:54 -0500
commit6cdc2645d849addc2b4bbb71ea2bc1933b5b2b41 (patch)
treebaa8173100468f2c56fc27a71cd01eeb6b1a85c3 /tests
parent5c5ada8e284fa573080cb8a8174d706d1e7580fc (diff)
downloadpygments-6cdc2645d849addc2b4bbb71ea2bc1933b5b2b41.tar.gz
RTF Formatter: standardized tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_rtf_formatter.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_rtf_formatter.py b/tests/test_rtf_formatter.py
index ca500786..84ce8e1a 100644
--- a/tests/test_rtf_formatter.py
+++ b/tests/test_rtf_formatter.py
@@ -27,17 +27,20 @@ class RtfFormatterTest(unittest.TestCase):
def test_rtf_header(self):
t = u''
result = self.format_rtf(t)
- self.assertTrue(result.startswith(r'{\rtf1\ansi\uc0'))
+ expected = r'{\rtf1\ansi\uc0'
+ self.assertTrue(result.startswith(expected))
def test_ascii_characters(self):
t = u'a b c d ~'
result = self.format_rtf(t)
- self.assertTrue(result.endswith(r'a b c d ~\par' '\n' r'}'))
+ expected = (r'a b c d ~\par' '\n' r'}')
+ self.assertTrue(result.endswith(expected))
def test_escape_characters(self):
t = u'\ {{'
result = self.format_rtf(t)
- self.assertTrue(result.endswith(r'\\ \{\{\par' '\n' r'}'))
+ expected = (r'\\ \{\{\par' '\n' r'}')
+ self.assertTrue(result.endswith(expected))
def test_single_characters(self):
t = u'â € ¤ каждой'