#NEWLINE# def test_fileno( self ) : #NEWLINE# #INDENT# if ( ( sys . platform in ( 'win32' , ) ) or ( not hasattr ( os , 'fdopen' ) ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# open_url = urllib . urlopen ( 'http://www.python.org/' ) #NEWLINE# fd = open_url . fileno ( ) #NEWLINE# FILE = os . fdopen ( fd ) #NEWLINE# try : #NEWLINE# #INDENT# self . assert_ ( FILE . read ( ) , 'reading from file created using fd returned by fileno failed' ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# FILE . close ( )