@@ -55,7 +55,7 @@ def fix_up(cls, command_class): pass
5555 command = TestCommandLineParserCommand ()
5656 CommandLineParser .parse (command , options )
5757
58- for option in command .options .values ():
58+ for option in list ( command .options .values () ):
5959 if option .name in ['logging_configuration' , 'logging_level' , 'record' , 'show_configuration' ]:
6060 self .assertFalse (option .is_set )
6161 continue
@@ -72,7 +72,7 @@ def fix_up(cls, command_class): pass
7272 command = TestCommandLineParserCommand ()
7373 CommandLineParser .parse (command , options + fieldnames )
7474
75- for option in command .options .values ():
75+ for option in list ( command .options .values () ):
7676 if option .name in ['logging_configuration' , 'logging_level' , 'record' , 'show_configuration' ]:
7777 self .assertFalse (option .is_set )
7878 continue
@@ -87,7 +87,7 @@ def fix_up(cls, command_class): pass
8787 command = TestCommandLineParserCommand ()
8888 CommandLineParser .parse (command , ['required_option=true' ] + fieldnames )
8989
90- for option in command .options .values ():
90+ for option in list ( command .options .values () ):
9191 if option .name in ['unnecessary_option' , 'logging_configuration' , 'logging_level' , 'record' ,
9292 'show_configuration' ]:
9393 self .assertFalse (option .is_set )
@@ -282,7 +282,7 @@ def test_input_header(self):
282282 'sentence' : 'hello world!' }
283283
284284 input_header = InputHeader ()
285- text = reduce (lambda value , item : value + f'{ item [0 ]} :{ item [1 ]} \n ' , collection .items (), '' ) + '\n '
285+ text = reduce (lambda value , item : value + f'{ item [0 ]} :{ item [1 ]} \n ' , list ( collection .items () ), '' ) + '\n '
286286
287287 with closing (StringIO (text )) as input_file :
288288 input_header .read (input_file )
0 commit comments