summaryrefslogtreecommitdiffstats
path: root/Lib/sqlite3/test/transactions.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2009-07-04 08:32:15 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2009-07-04 08:32:15 (GMT)
commit04cecafce10abc8906a96aa16c0a7a87d9fb8227 (patch)
tree8858575e95a59943468576ca305f929f257eabc4 /Lib/sqlite3/test/transactions.py
parent0d3fa833a1a12fcff34541c4a024544b40debf98 (diff)
downloadcpython-04cecafce10abc8906a96aa16c0a7a87d9fb8227.zip
cpython-04cecafce10abc8906a96aa16c0a7a87d9fb8227.tar.gz
cpython-04cecafce10abc8906a96aa16c0a7a87d9fb8227.tar.bz2
change deprecated unittest method calls into their proper names.
Diffstat (limited to 'Lib/sqlite3/test/transactions.py')
-rw-r--r--Lib/sqlite3/test/transactions.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/Lib/sqlite3/test/transactions.py b/Lib/sqlite3/test/transactions.py
index 0b6193b..c9f6125 100644
--- a/Lib/sqlite3/test/transactions.py
+++ b/Lib/sqlite3/test/transactions.py
@@ -58,14 +58,14 @@ class TransactionTests(unittest.TestCase):
self.cur1.execute("create table test2(j)")
self.cur2.execute("select i from test")
res = self.cur2.fetchall()
- self.failUnlessEqual(len(res), 1)
+ self.assertEqual(len(res), 1)
def CheckInsertStartsTransaction(self):
self.cur1.execute("create table test(i)")
self.cur1.execute("insert into test(i) values (5)")
self.cur2.execute("select i from test")
res = self.cur2.fetchall()
- self.failUnlessEqual(len(res), 0)
+ self.assertEqual(len(res), 0)
def CheckUpdateStartsTransaction(self):
self.cur1.execute("create table test(i)")
@@ -74,7 +74,7 @@ class TransactionTests(unittest.TestCase):
self.cur1.execute("update test set i=6")
self.cur2.execute("select i from test")
res = self.cur2.fetchone()[0]
- self.failUnlessEqual(res, 5)
+ self.assertEqual(res, 5)
def CheckDeleteStartsTransaction(self):
self.cur1.execute("create table test(i)")
@@ -83,7 +83,7 @@ class TransactionTests(unittest.TestCase):
self.cur1.execute("delete from test")
self.cur2.execute("select i from test")
res = self.cur2.fetchall()
- self.failUnlessEqual(len(res), 1)
+ self.assertEqual(len(res), 1)
def CheckReplaceStartsTransaction(self):
self.cur1.execute("create table test(i)")
@@ -92,24 +92,24 @@ class TransactionTests(unittest.TestCase):
self.cur1.execute("replace into test(i) values (6)")
self.cur2.execute("select i from test")
res = self.cur2.fetchall()
- self.failUnlessEqual(len(res), 1)
- self.failUnlessEqual(res[0][0], 5)
+ self.assertEqual(len(res), 1)
+ self.assertEqual(res[0][0], 5)
def CheckToggleAutoCommit(self):
self.cur1.execute("create table test(i)")
self.cur1.execute("insert into test(i) values (5)")
self.con1.isolation_level = None
- self.failUnlessEqual(self.con1.isolation_level, None)
+ self.assertEqual(self.con1.isolation_level, None)
self.cur2.execute("select i from test")
res = self.cur2.fetchall()
- self.failUnlessEqual(len(res), 1)
+ self.assertEqual(len(res), 1)
self.con1.isolation_level = "DEFERRED"
- self.failUnlessEqual(self.con1.isolation_level , "DEFERRED")
+ self.assertEqual(self.con1.isolation_level , "DEFERRED")
self.cur1.execute("insert into test(i) values (5)")
self.cur2.execute("select i from test")
res = self.cur2.fetchall()
- self.failUnlessEqual(len(res), 1)
+ self.assertEqual(len(res), 1)
def CheckRaiseTimeout(self):
if sqlite.sqlite_version_info < (3, 2, 2):