summaryrefslogtreecommitdiff
path: root/cherrypy/test/logtest.py
diff options
context:
space:
mode:
authorRobert Brewer <fumanchu@aminus.org>2009-06-14 22:57:43 +0000
committerRobert Brewer <fumanchu@aminus.org>2009-06-14 22:57:43 +0000
commitfcfe0b95f43bfbeb21921cbfc38848724c12db94 (patch)
tree9aa8d880e015925e9cc1517471657a8a8c82dea9 /cherrypy/test/logtest.py
parent47c22fbf17a94ce82dbb0564d304e10cea81e62b (diff)
downloadcherrypy-git-fcfe0b95f43bfbeb21921cbfc38848724c12db94.tar.gz
Removed py3print.
Diffstat (limited to 'cherrypy/test/logtest.py')
-rw-r--r--cherrypy/test/logtest.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/cherrypy/test/logtest.py b/cherrypy/test/logtest.py
index 78d7a740..c093da2c 100644
--- a/cherrypy/test/logtest.py
+++ b/cherrypy/test/logtest.py
@@ -3,6 +3,8 @@
import sys
import time
+import cherrypy
+
try:
# On Windows, msvcrt.getch reads a single char without output.
@@ -41,36 +43,36 @@ class LogCase(object):
markerPrefix = "test suite marker: "
def _handleLogError(self, msg, data, marker, pattern):
- cherrypy.py3print()
- cherrypy.py3print(" ERROR:", msg)
+ print("")
+ print(" ERROR: %s" % msg)
if not self.interactive:
raise self.failureException(msg)
p = " Show: [L]og [M]arker [P]attern; [I]gnore, [R]aise, or sys.e[X]it >> "
- cherrypy.py3print(p, end=' ')
+ print p,
# ARGH
sys.stdout.flush()
while True:
i = getchar().upper()
if i not in "MPLIRX":
continue
- cherrypy.py3print(i.upper()) # Also prints new line
+ print(i.upper()) # Also prints new line
if i == "L":
for x, line in enumerate(data):
if (x + 1) % self.console_height == 0:
# The \r and comma should make the next line overwrite
- cherrypy.py3print("<-- More -->\r", end=' ')
+ print "<-- More -->\r",
m = getchar().lower()
# Erase our "More" prompt
- cherrypy.py3print(" \r", end=' ')
+ print " \r",
if m == "q":
break
- cherrypy.py3print(line.rstrip())
+ print(line.rstrip())
elif i == "M":
- cherrypy.py3print(repr(marker or self.lastmarker))
+ print(repr(marker or self.lastmarker))
elif i == "P":
- cherrypy.py3print(repr(pattern))
+ print(repr(pattern))
elif i == "I":
# return without raising the normal exception
return
@@ -78,7 +80,7 @@ class LogCase(object):
raise self.failureException(msg)
elif i == "X":
self.exit()
- cherrypy.py3print(p, end=' ')
+ print p,
def exit(self):
sys.exit()