File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -103,21 +103,19 @@ def test_stdout(self):
103103 reason = "Currently don't capture during test as pytest does its own capturing"
104104 )
105105 def test_capfd (self ):
106- """ Does correctly capture fd
107- """
106+ """Does correctly capture fd"""
108107 kernel = InProcessKernel ()
109108
110109 with capture_output () as io :
111110 kernel .shell .run_cell ('print("foo")' )
112- assert io .stdout == ' foo\n '
111+ assert io .stdout == " foo\n "
113112
114113 kc = BlockingInProcessKernelClient (kernel = kernel , session = kernel .session )
115114 kernel .frontends .append (kc )
116- kc .execute (' import os' )
115+ kc .execute (" import os" )
117116 kc .execute ('os.system("echo capfd")' )
118117 out , err = assemble_output (kc .iopub_channel )
119- assert out == 'capfd\n '
120-
118+ assert out == "capfd\n "
121119
122120 def test_getpass_stream (self ):
123121 "Tests that kernel getpass accept the stream parameter"
Original file line number Diff line number Diff line change 1515import traceback
1616from io import StringIO , TextIOBase
1717import io
18- import os
1918
2019import zmq
2120if zmq .pyzmq_version_info () >= (17 , 0 ):
3938# IO classes
4039#-----------------------------------------------------------------------------
4140
41+
4242class IOPubThread (object ):
4343 """An object for sending IOPub messages in a background thread
4444
@@ -293,7 +293,7 @@ def fileno(self):
293293 """
294294 Things like subprocess will peak and write to the fileno() of stderr/stdout.
295295 """
296- if getattr (self , ' _original_stdstream_copy' , None ) is not None :
296+ if getattr (self , " _original_stdstream_copy" , None ) is not None :
297297 return self ._original_stdstream_copy
298298 else :
299299 raise io .UnsupportedOperation ("fileno" )
You can’t perform that action at this time.
0 commit comments