Issue #9337: Make float.__str__ identical to float.__repr__.

(And similarly for complex numbers.)
This commit is contained in:
Mark Dickinson 2010-08-04 20:56:28 +00:00
parent b6c5074920
commit 388122d43b
10 changed files with 63 additions and 85 deletions

View file

@ -80,8 +80,7 @@ class UnicodeDatabaseTest(unittest.TestCase):
class UnicodeFunctionsTest(UnicodeDatabaseTest):
# update this, if the database changes
expectedchecksum = '6ccf1b1a36460d2694f9b0b0f0324942fe70ede6'
expectedchecksum = 'e89a6380093a00a7685ac7b92e7367d737fcb79b'
def test_function_checksum(self):
data = []
h = hashlib.sha1()
@ -90,9 +89,9 @@ class UnicodeFunctionsTest(UnicodeDatabaseTest):
char = chr(i)
data = [
# Properties
str(self.db.digit(char, -1)),
str(self.db.numeric(char, -1)),
str(self.db.decimal(char, -1)),
format(self.db.digit(char, -1), '.12g'),
format(self.db.numeric(char, -1), '.12g'),
format(self.db.decimal(char, -1), '.12g'),
self.db.category(char),
self.db.bidirectional(char),
self.db.decomposition(char),