mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Fix most trivially-findable print statements.
There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
This commit is contained in:
parent
452bf519a7
commit
be19ed77dd
331 changed files with 2567 additions and 2648 deletions
|
@ -49,27 +49,27 @@ class LockingTestCase(unittest.TestCase):
|
|||
|
||||
def test01_simple(self):
|
||||
if verbose:
|
||||
print '\n', '-=' * 30
|
||||
print "Running %s.test01_simple..." % self.__class__.__name__
|
||||
print('\n', '-=' * 30)
|
||||
print("Running %s.test01_simple..." % self.__class__.__name__)
|
||||
|
||||
anID = self.env.lock_id()
|
||||
if verbose:
|
||||
print "locker ID: %s" % anID
|
||||
print("locker ID: %s" % anID)
|
||||
lock = self.env.lock_get(anID, "some locked thing", db.DB_LOCK_WRITE)
|
||||
if verbose:
|
||||
print "Aquired lock: %s" % lock
|
||||
print("Aquired lock: %s" % lock)
|
||||
time.sleep(1)
|
||||
self.env.lock_put(lock)
|
||||
if verbose:
|
||||
print "Released lock: %s" % lock
|
||||
print("Released lock: %s" % lock)
|
||||
|
||||
|
||||
|
||||
|
||||
def test02_threaded(self):
|
||||
if verbose:
|
||||
print '\n', '-=' * 30
|
||||
print "Running %s.test02_threaded..." % self.__class__.__name__
|
||||
print('\n', '-=' * 30)
|
||||
print("Running %s.test02_threaded..." % self.__class__.__name__)
|
||||
|
||||
threads = []
|
||||
threads.append(Thread(target = self.theThread,
|
||||
|
@ -113,17 +113,17 @@ class LockingTestCase(unittest.TestCase):
|
|||
|
||||
anID = self.env.lock_id()
|
||||
if verbose:
|
||||
print "%s: locker ID: %s" % (name, anID)
|
||||
print("%s: locker ID: %s" % (name, anID))
|
||||
|
||||
lock = self.env.lock_get(anID, "some locked thing", lockType)
|
||||
if verbose:
|
||||
print "%s: Aquired %s lock: %s" % (name, lt, lock)
|
||||
print("%s: Aquired %s lock: %s" % (name, lt, lock))
|
||||
|
||||
time.sleep(sleepTime)
|
||||
|
||||
self.env.lock_put(lock)
|
||||
if verbose:
|
||||
print "%s: Released %s lock: %s" % (name, lt, lock)
|
||||
print("%s: Released %s lock: %s" % (name, lt, lock))
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue