| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -170,10 +170,14 @@ def test_numeric(self): | |||
| 170 | 170 | ||
| 171 | 171 | # New in 4.1.0 | |
| 172 | 172 | self.assertEqual(self.db.numeric('\U0001012A', None), None if self.old else 9000) | |
| 173 | + # Changed in 4.1.0 | ||
| 174 | + self.assertEqual(self.db.numeric('\u5793', None), 1e20 if self.old else None) | ||
| 173 | 175 | # New in 5.0.0 | |
| 174 | 176 | self.assertEqual(self.db.numeric('\u07c0', None), None if self.old else 0.0) | |
| 175 | 177 | # New in 5.1.0 | |
| 176 | 178 | self.assertEqual(self.db.numeric('\ua627', None), None if self.old else 7.0) | |
| 179 | + # Changed in 5.2.0 | ||
| 180 | + self.assertEqual(self.db.numeric('\u09f6'), 3.0 if self.old else 3/16) | ||
| 177 | 181 | # New in 6.0.0 | |
| 178 | 182 | self.assertEqual(self.db.numeric('\u0b72', None), None if self.old else 0.25) | |
| 179 | 183 | # New in 12.0.0 | |
@@ -569,9 +573,9 @@ def test_east_asian_width_unassigned(self): | |||
| 569 | 573 | class Unicode_3_2_0_FunctionsTest(UnicodeFunctionsTest): | |
| 570 | 574 | db = unicodedata.ucd_3_2_0 | |
| 571 | 575 | old = True | |
| 572 | - expectedchecksum = ('76b126d719d52ba11788a627d058163106da7d56' | ||
| 576 | + expectedchecksum = ('4154d8d1232837e255edf3cdcbb5ab184d71f4a4' | ||
| 573 | 577 | if quicktest else | |
| 574 | - '871389bdd96a709929496da7f9e59718daf61adb') | ||
| 578 | + 'b678d38ffbf1f1de092b2af1ed155602909fcd8d') | ||
| 575 | 579 | ||
| 576 | 580 | ||
| 577 | 581 | class UnicodeMiscTest(unittest.TestCase): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1 @@ | |||
| 1 | + Fix :meth:`!unicodedata.ucd_3_2_0.numeric` for non-decimal values. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -228,9 +228,9 @@ unicodedata_UCD_numeric_impl(PyObject *self, int chr, | |||
| 228 | 228 | have_old = 1; | |
| 229 | 229 | rc = -1.0; | |
| 230 | 230 | } | |
| 231 | - else if (old->decimal_changed != 0xFF) { | ||
| 231 | + else if (old->numeric_changed != 0.0) { | ||
| 232 | 232 | have_old = 1; | |
| 233 | - rc = old->decimal_changed; | ||
| 233 | + rc = old->numeric_changed; | ||
| 234 | 234 | } | |
| 235 | 235 | } | |
| 236 | 236 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments