diff options
author | Tim Hatch <tim@timhatch.com> | 2014-04-14 20:14:51 -0400 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2014-04-14 20:14:51 -0400 |
commit | c75a752481251a0f2033a0db2466f293e73fa7e2 (patch) | |
tree | 2fd7271a0e92112cb2c3c7dc04773379bd72dd07 /tests/test_cmdline.py | |
parent | 11226c63db8ed714bf233e34d44141a4ad3df934 (diff) | |
parent | c852aa1e65a7175a4d62d321b9b18f70e4e6b93a (diff) | |
download | pygments-c75a752481251a0f2033a0db2466f293e73fa7e2.tar.gz |
Merged in ssproessig/pygments-main (pull request #266)
Diffstat (limited to 'tests/test_cmdline.py')
-rw-r--r-- | tests/test_cmdline.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index 5ad815c0..ef14661c 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -3,17 +3,18 @@ Command line test ~~~~~~~~~~~~~~~~~ - :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # Test the command line interface -import sys, os +import io +import sys import unittest -import StringIO from pygments import highlight +from pygments.util import StringIO from pygments.cmdline import main as cmdline_main import support @@ -24,8 +25,8 @@ TESTFILE, TESTDIR = support.location(__file__) def run_cmdline(*args): saved_stdout = sys.stdout saved_stderr = sys.stderr - new_stdout = sys.stdout = StringIO.StringIO() - new_stderr = sys.stderr = StringIO.StringIO() + new_stdout = sys.stdout = StringIO() + new_stderr = sys.stderr = StringIO() try: ret = cmdline_main(["pygmentize"] + list(args)) finally: |