Fix TestCommandScriptImmediateOutput for python3

s/iteritems/items

llvm-svn: 356370
This commit is contained in:
Pavel Labath 2019-03-18 14:13:12 +00:00
parent 84de8a30a0
commit 58e9ef139d
1 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ class CommandScriptImmediateOutputTestCase (PExpectTest):
starter_string = 'Starter Garbage\n'
write_string = 'writing to file with mode: '
for path, mode in test_files.iteritems():
for path, mode in test_files.items():
with open(path, 'w+') as init:
init.write(starter_string)
@ -78,7 +78,7 @@ class CommandScriptImmediateOutputTestCase (PExpectTest):
self.sendline(
'command script add -f custom_command.write_file mywrite',
patterns=[prompt])
for path, mode in test_files.iteritems():
for path, mode in test_files.items():
command = 'mywrite "' + path + '" ' + mode
self.sendline(command, patterns=[prompt])
@ -87,7 +87,7 @@ class CommandScriptImmediateOutputTestCase (PExpectTest):
self.quit(gracefully=False)
for path, mode in test_files.iteritems():
for path, mode in test_files.items():
with open(path, 'r') as result:
if mode in ['r', 'a', 'a+']:
self.assertEquals(result.readline(), starter_string)