diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_basic_api.py | 2 | ||||
-rw-r--r-- | tests/test_cmdline.py | 4 | ||||
-rw-r--r-- | tests/test_html_formatter.py | 5 | ||||
-rw-r--r-- | tests/test_latex_formatter.py | 3 |
4 files changed, 8 insertions, 6 deletions
diff --git a/tests/test_basic_api.py b/tests/test_basic_api.py index f07c00e7..d05a29c5 100644 --- a/tests/test_basic_api.py +++ b/tests/test_basic_api.py @@ -79,7 +79,7 @@ class LexersTest(unittest.TestCase): tokens = list(lx.get_tokens(text)) roundtext = ''.join([t[1] for t in tokens]) self.assertEquals(roundtext, text, - "lexer roundtrip with %s filter failed" % x) + "lexer roundtrip with %s filter failed" % x) class FormattersTest(unittest.TestCase): diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index e82eb247..89048db9 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -35,10 +35,10 @@ class CmdLineTest(unittest.TestCase): c, o, e = run_cmdline("-L") self.assertEquals(c, 0) self.assert_("Lexers" in o and "Formatters" in o and - "Filters" in o and "Styles" in o) + "Filters" in o and "Styles" in o) c, o, e = run_cmdline("-L", "lexer") self.assertEquals(c, 0) - self.assert_("Lexers" in o and not "Formatters" in o) + self.assert_("Lexers" in o and "Formatters" not in o) c, o, e = run_cmdline("-L", "lexers") self.assertEquals(c, 0) diff --git a/tests/test_html_formatter.py b/tests/test_html_formatter.py index b3b133e9..1206f782 100644 --- a/tests/test_html_formatter.py +++ b/tests/test_html_formatter.py @@ -18,7 +18,8 @@ from pygments.lexers import PythonLexer from pygments.formatters import HtmlFormatter, NullFormatter from pygments.formatters.html import escape_html -tokensource = list(PythonLexer().get_tokens(file(os.path.join(testdir, testfile)).read())) +tokensource = list(PythonLexer().get_tokens(file( + os.path.join(testdir, testfile)).read())) class HtmlFormatterTest(unittest.TestCase): def test_correct_output(self): @@ -62,7 +63,7 @@ class HtmlFormatterTest(unittest.TestCase): dict(linenos=True), dict(linenos=True, full=True), dict(linenos=True, full=True, noclasses=True)]: - + outfile = StringIO.StringIO() fmt = HtmlFormatter(**optdict) fmt.format(tokensource, outfile) diff --git a/tests/test_latex_formatter.py b/tests/test_latex_formatter.py index ae543265..45f48638 100644 --- a/tests/test_latex_formatter.py +++ b/tests/test_latex_formatter.py @@ -18,7 +18,8 @@ from pygments.lexers import PythonLexer class LatexFormatterTest(unittest.TestCase): def test_valid_output(self): - tokensource = list(PythonLexer().get_tokens(file(os.path.join(testdir, testfile)).read())) + tokensource = list(PythonLexer().get_tokens(file( + os.path.join(testdir, testfile)).read())) fmt = LatexFormatter(full=True) handle, pathname = tempfile.mkstemp('.tex') |