#NEWLINE# def testAllowOne( self ) : #NEWLINE# #INDENT# 'Single item promotion' #NEWLINE# cvtType = cvt . Converter ( cvt . toType , float ) #NEWLINE# converter = cvt . toListOf #NEWLINE# l1 = [ '123' ] #NEWLINE# right = map ( float , l1 ) #NEWLINE# v = converter ( l1 [ 0 ] , converter , allowOne = True ) #NEWLINE# self . assertEqual ( right , v , 'Incorrect conversion of single item.' )