summaryrefslogtreecommitdiff
path: root/Lib/sqlite3/test/hooks.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-06-14 00:42:50 +0300
committerBerker Peksag <berker.peksag@gmail.com>2016-06-14 00:42:50 +0300
commit48b5c98e6e0139c24298f6ed7962da29d0f9cb89 (patch)
tree53c7337a6959ea48dfbe1625dfdec222962d625d /Lib/sqlite3/test/hooks.py
parentf5b1af6df559f1c29211701f21bd181eab6a5b60 (diff)
downloadcpython-git-48b5c98e6e0139c24298f6ed7962da29d0f9cb89.tar.gz
Replace more boilerplate code with modern unittest features in sqlite3 tests
Diffstat (limited to 'Lib/sqlite3/test/hooks.py')
-rw-r--r--Lib/sqlite3/test/hooks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py
index 67653aeeb9..de69569d1c 100644
--- a/Lib/sqlite3/test/hooks.py
+++ b/Lib/sqlite3/test/hooks.py
@@ -61,8 +61,8 @@ class CollationTests(unittest.TestCase):
) order by x collate mycoll
"""
result = con.execute(sql).fetchall()
- if result[0][0] != "c" or result[1][0] != "b" or result[2][0] != "a":
- self.fail("the expected order was not returned")
+ self.assertEqual(result, [('c',), ('b',), ('a',)],
+ msg='the expected order was not returned')
con.create_collation("mycoll", None)
with self.assertRaises(sqlite.OperationalError) as cm: