diff --git a/nbconvert/writers/stdout.py b/nbconvert/writers/stdout.py index 8ed2dcc3b..44b82fb57 100644 --- a/nbconvert/writers/stdout.py +++ b/nbconvert/writers/stdout.py @@ -22,4 +22,3 @@ def write(self, output, resources, **kw): """ stream = io.unicode_std_stream() stream.write(output) - stream.close() diff --git a/tests/utils/test_io.py b/tests/utils/test_io.py index 985ba1673..7abc8b9b3 100644 --- a/tests/utils/test_io.py +++ b/tests/utils/test_io.py @@ -21,7 +21,6 @@ def test_UnicodeStdStream(): sample = "@łe¶ŧ←" stream = unicode_std_stream() stream.write(sample) - stream.close() output = stdoutb.getvalue().decode("utf-8") assert output == sample