Skip to content

Commit 3ed4416

Browse files
authored
tests/suite: print() is a function in Python 3 (#2014)
1 parent b6b159d commit 3ed4416

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

tests/suite/compat/sbs_builtin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_xrange(self):
4545
import os
4646

4747
if os.name == 'posix':
48-
print 'Skipping the xrange test on posix https://github.com/IronLanguages/main/issues/1607'
48+
print('Skipping the xrange test on posix https://github.com/IronLanguages/main/issues/1607')
4949
return
5050

5151
maxint = sys.maxsize

tests/suite/test_peverify.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ def test_badil(self):
3737
process.WaitForExit()
3838
ret = process.ExitCode
3939

40-
print "ExitCode:", ret
41-
print "Output: ", output1
42-
print "Error: ", output2
43-
print
40+
print("ExitCode:", ret)
41+
print("Output: ", output1)
42+
print("Error: ", output2)
43+
print()
4444

4545
self.assertEqual(ret, 1)
4646
self.assertTrue("Error Verifying" in output1 or "Error(s) Verifying" in output1)

tests/suite/test_superconsole.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def getTestOutput():
2222
if "ip_session.log" in os.listdir(os.getcwd()):
2323
tfile = open('ip_session.log', 'r')
2424
break
25-
print "Waiting for ip_session.log to be created..."
25+
print("Waiting for ip_session.log to be created...")
2626
time.sleep(1)
2727

2828
outlines = tfile.readlines()
@@ -56,7 +56,7 @@ def setUp(self):
5656

5757
tempMauiDir = Path.GetTempPath()
5858

59-
print "Copying Maui.Core.dll to %s for peverify..." % (tempMauiDir)
59+
print("Copying Maui.Core.dll to %s for peverify..." % (tempMauiDir))
6060
if not File.Exists(tempMauiDir + '\\Maui.Core.dll'):
6161
File.Copy(testpath.rowan_root + '\\Util\\Internal\\Maui_old\\Maui.Core.dll',
6262
tempMauiDir + '\\Maui.Core.dll')
@@ -71,7 +71,7 @@ def setUp(self):
7171
try:
7272
clr.AddReference('Maui.Core.dll')
7373
except:
74-
print "test_superconsole.py failed: cannot load Maui.Core assembly"
74+
print("test_superconsole.py failed: cannot load Maui.Core assembly")
7575
sys.exit(int(is_snap))
7676

7777
from Maui.Core import App
@@ -87,8 +87,8 @@ def setUp(self):
8787
try:
8888
superConsole = App(proc.Id)
8989
except Exception as e:
90-
print "test_superconsole.py failed: cannot initialize App object (probably running as service, or in minimized remote window)"
91-
print "On VSLGO-MAUI machines close all remote desktop sessions using EXIT command on desktop!"
90+
print("test_superconsole.py failed: cannot initialize App object (probably running as service, or in minimized remote window)")
91+
print("On VSLGO-MAUI machines close all remote desktop sessions using EXIT command on desktop!")
9292
proc.Kill()
9393
sys.exit(1)
9494

@@ -351,7 +351,7 @@ def test_control_character_rendering(self):
351351
# check that Ctrl-C breaks an infinite loop (the test is that subsequent things actually appear)
352352
superConsole.SendKeys('while True: pass{ENTER}{ENTER}')
353353
superConsole.SendKeys('^(c)')
354-
print "CodePlex Work Item 12401"
354+
print("CodePlex Work Item 12401")
355355
errors = [
356356
"Traceback (most recent call last):", #CodePlex Work Item 12401
357357
" File", #CodePlex Work Item 12401

0 commit comments

Comments
 (0)