File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1313
1414import doctest
1515import unittest
16- from io import StringIO
1716from textwrap import dedent
1817from test import support
1918from test .support import import_helper , os_helper
@@ -722,7 +721,7 @@ def set_pickle_data(self, data):
722721 pickle .dump (data , f )
723722
724723 def invoke_pickle (self , * flags ):
725- output = StringIO ()
724+ output = io . StringIO ()
726725 with contextlib .redirect_stdout (output ):
727726 pickle ._main (args = [* flags , self .filename ])
728727 return self .text_normalize (output .getvalue ())
@@ -751,7 +750,7 @@ def test_unknown_flag(self):
751750 self .set_pickle_data (data )
752751 with self .assertRaises (SystemExit ):
753752 # suppress argparse error message
754- with contextlib .redirect_stderr (StringIO ()):
753+ with contextlib .redirect_stderr (io . StringIO ()):
755754 _ = self .invoke_pickle ('--unknown' )
756755
757756
You can’t perform that action at this time.
0 commit comments