summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test/test_compare.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-08-02 03:14:27 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-08-02 03:14:27 (GMT)
commit38a5800cdca6ca11cd60ad07c520a512e88304de (patch)
treef163f433c128a5691d37cff8549518ef5b085959 /Lib/bsddb/test/test_compare.py
parent9c4fbdbc55f25a24a0ea137fecee5d880510fa9e (diff)
downloadcpython-38a5800cdca6ca11cd60ad07c520a512e88304de.zip
cpython-38a5800cdca6ca11cd60ad07c520a512e88304de.tar.gz
cpython-38a5800cdca6ca11cd60ad07c520a512e88304de.tar.bz2
Merged revisions 77871,77910,77913 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r77871 | ezio.melotti | 2010-01-31 13:46:54 +0200 (Sun, 31 Jan 2010) | 1 line #7092: silence more -3 and -Wd warnings ........ r77910 | ezio.melotti | 2010-02-02 10:37:35 +0200 (Tue, 02 Feb 2010) | 1 line #7092: silence py3k warnings for bsddb. Patch by Florent Xicluna. ........ r77913 | ezio.melotti | 2010-02-02 19:34:37 +0200 (Tue, 02 Feb 2010) | 1 line #7092: Silence py3k warnings in test_exceptions and test_pep352. Patch by Florent Xicluna. ........
Diffstat (limited to 'Lib/bsddb/test/test_compare.py')
-rw-r--r--Lib/bsddb/test/test_compare.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/bsddb/test/test_compare.py b/Lib/bsddb/test/test_compare.py
index b89ec8c..1d74f59 100644
--- a/Lib/bsddb/test/test_compare.py
+++ b/Lib/bsddb/test/test_compare.py
@@ -30,7 +30,7 @@ class ComparatorTests (unittest.TestCase):
data = expected_data[:]
import sys
- if sys.version_info[0] < 3 :
+ if sys.version_info[:3] < (2, 6, 0):
if sys.version_info[:3] < (2, 4, 0):
data.sort(comparator)
else :
@@ -47,7 +47,7 @@ class ComparatorTests (unittest.TestCase):
data2.append(i)
data = data2
- self.failUnless (data == expected_data,
+ self.assertEqual (data, expected_data,
"comparator `%s' is not right: %s vs. %s"
% (comparator, expected_data, data))
def test_lexical_comparator (self):
@@ -115,14 +115,14 @@ class AbstractBtreeKeyCompareTestCase (unittest.TestCase):
rec = curs.first ()
while rec:
key, ignore = rec
- self.failUnless (index < len (expected),
+ self.assertTrue (index < len (expected),
"to many values returned from cursor")
- self.failUnless (expected[index] == key,
+ self.assertEqual (expected[index], key,
"expected value `%s' at %d but got `%s'"
% (expected[index], index, key))
index = index + 1
rec = curs.next ()
- self.failUnless (index == len (expected),
+ self.assertEqual (index, len (expected),
"not enough values returned from cursor")
finally:
curs.close ()