diff options
author | Lakin Wecker <none@none> | 2009-06-01 16:43:59 +0000 |
---|---|---|
committer | Lakin Wecker <none@none> | 2009-06-01 16:43:59 +0000 |
commit | bcac4e137da9675a5ba2ba4dfe0404288749e33a (patch) | |
tree | 9640ef6ef03106e218e9623e852e4c4f5fd42f8e /cherrypy/test/logtest.py | |
parent | 03f15ebb2a21e24a2a7458b9022ce05e89137fa4 (diff) | |
download | cherrypy-git-bcac4e137da9675a5ba2ba4dfe0404288749e33a.tar.gz |
trunk - adding a py3util module that will normalize as many differences between this branch and the python3 branch as it can. First it includes a py3print call who's signature matches that of print in python3. Also removed a few byte strings of the form b''
Diffstat (limited to 'cherrypy/test/logtest.py')
-rw-r--r-- | cherrypy/test/logtest.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/cherrypy/test/logtest.py b/cherrypy/test/logtest.py index 7cec7d1b..78d7a740 100644 --- a/cherrypy/test/logtest.py +++ b/cherrypy/test/logtest.py @@ -41,36 +41,36 @@ class LogCase(object): markerPrefix = "test suite marker: " def _handleLogError(self, msg, data, marker, pattern): - print - print " ERROR:", msg + cherrypy.py3print() + cherrypy.py3print(" ERROR:", 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 >> " - print p, - # ARGH! + cherrypy.py3print(p, end=' ') + # ARGH sys.stdout.flush() while True: i = getchar().upper() if i not in "MPLIRX": continue - print i.upper() # Also prints new line + cherrypy.py3print(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 - print "<-- More -->\r", + cherrypy.py3print("<-- More -->\r", end=' ') m = getchar().lower() # Erase our "More" prompt - print " \r", + cherrypy.py3print(" \r", end=' ') if m == "q": break - print line.rstrip() + cherrypy.py3print(line.rstrip()) elif i == "M": - print repr(marker or self.lastmarker) + cherrypy.py3print(repr(marker or self.lastmarker)) elif i == "P": - print repr(pattern) + cherrypy.py3print(repr(pattern)) elif i == "I": # return without raising the normal exception return @@ -78,7 +78,7 @@ class LogCase(object): raise self.failureException(msg) elif i == "X": self.exit() - print p, + cherrypy.py3print(p, end=' ') def exit(self): sys.exit() |