mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
convert old fail* assertions to assert*
This commit is contained in:
parent
98d23f2e06
commit
c9c0f201fe
275 changed files with 4540 additions and 4540 deletions
|
@ -232,7 +232,7 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
|
|||
if dec != -1:
|
||||
self.assertEqual(dec, self.db.numeric(c))
|
||||
count += 1
|
||||
self.assert_(count >= 10) # should have tested at least the ASCII digits
|
||||
self.assertTrue(count >= 10) # should have tested at least the ASCII digits
|
||||
|
||||
def test_digit_numeric_consistent(self):
|
||||
# Test that digit and numeric are consistent,
|
||||
|
@ -245,7 +245,7 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
|
|||
if dec != -1:
|
||||
self.assertEqual(dec, self.db.numeric(c))
|
||||
count += 1
|
||||
self.assert_(count >= 10) # should have tested at least the ASCII digits
|
||||
self.assertTrue(count >= 10) # should have tested at least the ASCII digits
|
||||
|
||||
def test_bug_1704793(self):
|
||||
self.assertEquals(self.db.lookup("GOTHIC LETTER FAIHU"), '\U00010346')
|
||||
|
@ -253,13 +253,13 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
|
|||
def test_ucd_510(self):
|
||||
import unicodedata
|
||||
# In UCD 5.1.0, a mirrored property changed wrt. UCD 3.2.0
|
||||
self.assert_(unicodedata.mirrored("\u0f3a"))
|
||||
self.assert_(not unicodedata.ucd_3_2_0.mirrored("\u0f3a"))
|
||||
self.assertTrue(unicodedata.mirrored("\u0f3a"))
|
||||
self.assertTrue(not unicodedata.ucd_3_2_0.mirrored("\u0f3a"))
|
||||
# Also, we now have two ways of representing
|
||||
# the upper-case mapping: as delta, or as absolute value
|
||||
self.assert_("a".upper()=='A')
|
||||
self.assert_("\u1d79".upper()=='\ua77d')
|
||||
self.assert_(".".upper()=='.')
|
||||
self.assertTrue("a".upper()=='A')
|
||||
self.assertTrue("\u1d79".upper()=='\ua77d')
|
||||
self.assertTrue(".".upper()=='.')
|
||||
|
||||
def test_bug_5828(self):
|
||||
self.assertEqual("\u1d79".lower(), "\u1d79")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue