diff options
author | Andrew McNamara <andrewm@object-craft.com.au> | 2005-01-12 03:45:10 (GMT) |
---|---|---|
committer | Andrew McNamara <andrewm@object-craft.com.au> | 2005-01-12 03:45:10 (GMT) |
commit | 31d8896ee21c28ee55ae4ba2764e11fba88c9fd4 (patch) | |
tree | 74876f274447a887dc57482d8645517748d99293 /Lib | |
parent | a08eecb63821ee5a439317a13782f41d394a2d90 (diff) | |
download | cpython-31d8896ee21c28ee55ae4ba2764e11fba88c9fd4.zip cpython-31d8896ee21c28ee55ae4ba2764e11fba88c9fd4.tar.gz cpython-31d8896ee21c28ee55ae4ba2764e11fba88c9fd4.tar.bz2 |
Rename csv.set_field_limit to csv.field_size_limit (since it both sets and
gets).
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/csv.py | 2 | ||||
-rw-r--r-- | Lib/test/test_csv.py | 14 |
2 files changed, 8 insertions, 8 deletions
@@ -6,7 +6,7 @@ csv.py - read/write/investigate CSV files import re from _csv import Error, __version__, writer, reader, register_dialect, \ unregister_dialect, get_dialect, list_dialects, \ - set_field_limit, \ + field_size_limit, \ QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QUOTE_NONE, \ __doc__ from _csv import Dialect as _Dialect diff --git a/Lib/test/test_csv.py b/Lib/test/test_csv.py index fd26e78..be1147d 100644 --- a/Lib/test/test_csv.py +++ b/Lib/test/test_csv.py @@ -233,21 +233,21 @@ class Test_Csv(unittest.TestCase): def test_read_bigfield(self): # This exercises the buffer realloc functionality and field size # limits. - limit = csv.set_field_limit() + limit = csv.field_size_limit() try: size = 50000 bigstring = 'X' * size bigline = '%s,%s' % (bigstring, bigstring) self._read_test([bigline], [[bigstring, bigstring]]) - csv.set_field_limit(size) + csv.field_size_limit(size) self._read_test([bigline], [[bigstring, bigstring]]) - self.assertEqual(csv.set_field_limit(), size) - csv.set_field_limit(size-1) + self.assertEqual(csv.field_size_limit(), size) + csv.field_size_limit(size-1) self.assertRaises(csv.Error, self._read_test, [bigline], []) - self.assertRaises(TypeError, csv.set_field_limit, None) - self.assertRaises(TypeError, csv.set_field_limit, 1, None) + self.assertRaises(TypeError, csv.field_size_limit, None) + self.assertRaises(TypeError, csv.field_size_limit, 1, None) finally: - csv.set_field_limit(limit) + csv.field_size_limit(limit) class TestDialectRegistry(unittest.TestCase): def test_registry_badargs(self): |