mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
When quoting=QUOTE_NONNUMERIC, the reader now casts unquoted fields
to floats.
This commit is contained in:
parent
5d45a8dc22
commit
0f0599ddc1
3 changed files with 70 additions and 32 deletions
|
@ -241,6 +241,12 @@ class Test_Csv(unittest.TestCase):
|
|||
quotechar=None, escapechar='\\')
|
||||
self._read_test(['1,",3,",5'], [['1', '"', '3', '"', '5']],
|
||||
quoting=csv.QUOTE_NONE, escapechar='\\')
|
||||
# will this fail where locale uses comma for decimals?
|
||||
self._read_test([',3,"5",7.3'], [['', 3, '5', 7.3]],
|
||||
quoting=csv.QUOTE_NONNUMERIC)
|
||||
self.assertRaises(ValueError, self._read_test,
|
||||
['abc,3'], [[]],
|
||||
quoting=csv.QUOTE_NONNUMERIC)
|
||||
|
||||
def test_read_bigfield(self):
|
||||
# This exercises the buffer realloc functionality and field size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue