Skip to content

Commit 2cf119c

Browse files
committed
remove second io import
1 parent 8f720ae commit 2cf119c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Lib/test/test_pickle.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
import doctest
1515
import unittest
16-
from io import StringIO
1716
from textwrap import dedent
1817
from test import support
1918
from 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

0 commit comments

Comments
 (0)