diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2013-03-02 18:32:57 +0100 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2013-03-02 18:32:57 +0100 |
commit | 27cd5cce4741f7f23dd970e8648ace9030b41fbc (patch) | |
tree | 0700782e1a53a7faa3276b858781b2da04b245be /testsuite/test_shell.py | |
parent | 20346e11223d4ad52a0885fbce0f862d32bd3846 (diff) | |
download | pep8-27cd5cce4741f7f23dd970e8648ace9030b41fbc.tar.gz |
More API tests
Diffstat (limited to 'testsuite/test_shell.py')
-rw-r--r-- | testsuite/test_shell.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/testsuite/test_shell.py b/testsuite/test_shell.py index 7c88efb..4317bca 100644 --- a/testsuite/test_shell.py +++ b/testsuite/test_shell.py @@ -4,15 +4,7 @@ import sys import unittest import pep8 -from testsuite.support import ROOT_DIR - - -class PseudoFile(list): - """Simplified file interface.""" - write = list.append - - def __str__(self): - return ''.join(self) +from testsuite.support import ROOT_DIR, PseudoFile class ShellTestCase(unittest.TestCase): @@ -52,7 +44,7 @@ class ShellTestCase(unittest.TestCase): errorcode = None except SystemExit: errorcode = sys.exc_info()[1].code - return str(sys.stdout), str(sys.stderr), errorcode + return sys.stdout.getvalue(), sys.stderr.getvalue(), errorcode def test_print_usage(self): stdout, stderr, errcode = self.pep8('--help') |