summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test/test_distributed_transactions.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-07-05 12:09:36 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-07-05 12:09:36 (GMT)
commit2b92cd3b16ba83aaaf11a91a19845ca6804663d9 (patch)
treea890b2b1c478f606baefde092103f496c0d24be4 /Lib/bsddb/test/test_distributed_transactions.py
parent8767de2f776e0c8c7404680cdacad83e5d902955 (diff)
downloadcpython-2b92cd3b16ba83aaaf11a91a19845ca6804663d9.zip
cpython-2b92cd3b16ba83aaaf11a91a19845ca6804663d9.tar.gz
cpython-2b92cd3b16ba83aaaf11a91a19845ca6804663d9.tar.bz2
bpo-30850: Use specialized assert methods in bsddb tests. (#2584)
This provides more information on test failures.
Diffstat (limited to 'Lib/bsddb/test/test_distributed_transactions.py')
-rw-r--r--Lib/bsddb/test/test_distributed_transactions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/bsddb/test/test_distributed_transactions.py b/Lib/bsddb/test/test_distributed_transactions.py
index 9058575..65ace9c 100644
--- a/Lib/bsddb/test/test_distributed_transactions.py
+++ b/Lib/bsddb/test/test_distributed_transactions.py
@@ -79,7 +79,7 @@ class DBTxn_distributed(unittest.TestCase):
recovered_txns=self.dbenv.txn_recover()
self.assertEqual(self.num_txns,len(recovered_txns))
for gid,txn in recovered_txns :
- self.assertTrue(gid in txns)
+ self.assertIn(gid, txns)
del txn
del recovered_txns
@@ -122,7 +122,7 @@ class DBTxn_distributed(unittest.TestCase):
# Be sure there are not pending transactions.
# Check also database size.
recovered_txns=self.dbenv.txn_recover()
- self.assertTrue(len(recovered_txns)==0)
+ self.assertEqual(len(recovered_txns), 0)
self.assertEqual(len(committed_txns),self.db.stat()["nkeys"])
class DBTxn_distributedSYNC(DBTxn_distributed):