#NEWLINE# def test_SetupToolsRequirement( self ) : #NEWLINE# #INDENT# testcases = [ ( 'foo==0.0.0' , { #NEWLINE# #INDENT# 'extras' : ( ) , #NEWLINE# 'key' : 'foo' , #NEWLINE# 'modules' : None , #NEWLINE# 'packages' : None , #NEWLINE# 'project_name' : 'foo' , #NEWLINE# 'repo_url' : None , #NEWLINE# 'resolved' : False , #NEWLINE# 'specs' : [ ( '==' , '0.0.0' ) ] , #NEWLINE# 'type' : 'setuptools' , #NEWLINE# 'unsafe_name' : 'foo' , #NEWLINE# #UNINDENT# } ) , ( 'foo[bar]>=0.1b' , { #NEWLINE# #INDENT# 'extras' : ( 'bar' , ) , #NEWLINE# 'key' : 'foo' , #NEWLINE# 'modules' : None , #NEWLINE# 'packages' : None , #NEWLINE# 'project_name' : 'foo' , #NEWLINE# 'repo_url' : None , #NEWLINE# 'resolved' : False , #NEWLINE# 'specs' : [ ( '>=' , '0.1b' ) ] , #NEWLINE# 'type' : 'setuptools' , #NEWLINE# 'unsafe_name' : 'foo' , #NEWLINE# #UNINDENT# } ) ] #NEWLINE# for testcase in testcases : #NEWLINE# #INDENT# ( req_str , exp_dict ) = ( testcase [ 0 ] , testcase [ 1 ] ) #NEWLINE# st_req = SetupToolsRequirement ( pr . Requirement . parse ( exp_dict ) ) #NEWLINE# self . assertDictEqual ( exp_dict , st_req . to_dict ( ) )