#NEWLINE# def test_sort_versions( self ) : #NEWLINE# #INDENT# target = [ '1.1.1' , '1.1.1b1' , '1.1.1b2' , '1.2.1' , '1.10.1' ] #NEWLINE# test = target [ : ] #NEWLINE# random . shuffle ( target ) #NEWLINE# self . assertListEqual ( sorted ( test , key = cmp_to_key ( compare_version ) ) , target )