summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test/test_lock.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/bsddb/test/test_lock.py')
-rw-r--r--Lib/bsddb/test/test_lock.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/bsddb/test/test_lock.py b/Lib/bsddb/test/test_lock.py
index 61bdae8..e44bf21 100644
--- a/Lib/bsddb/test/test_lock.py
+++ b/Lib/bsddb/test/test_lock.py
@@ -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))
#----------------------------------------------------------------------