mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
Replace more boilerplate code with modern unittest features in sqlite3 tests
This commit is contained in:
parent
f5b1af6df5
commit
48b5c98e6e
3 changed files with 6 additions and 13 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue