#NEWLINE# def test_set_blocking_changes_fd_flags( ) : #NEWLINE# #INDENT# with tempfile . TemporaryFile ( ) as f : #NEWLINE# #INDENT# io . set_blocking ( f , False ) #NEWLINE# flags = fcntl . fcntl ( f , fcntl . F_GETFL ) #NEWLINE# expect ( ( flags & os . O_NONBLOCK ) ) . to ( equal ( os . O_NONBLOCK ) ) #NEWLINE# io . set_blocking ( f , True ) #NEWLINE# flags = fcntl . fcntl ( f , fcntl . F_GETFL ) #NEWLINE# expect ( ( flags & os . O_NONBLOCK ) ) . to ( equal ( 0 ) )