summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_struct.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-1/+1
|\ | | | | | | error messages and comments.
| * Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-1/+1
| | | | | | | | error messages and comments.
* | Issue #14596: The struct.Struct() objects now use more compact implementation.Serhiy Storchaka2013-05-171-7/+2
| |
* | Issue #17804: New function ``struct.iter_unpack`` allows for streaming ↵Antoine Pitrou2013-04-261-1/+73
| | | | | | | | struct unpacking.
* | Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-3/+3
|/
* Issue #15467: Merge 3.2Martin v. Löwis2012-07-291-30/+10
|\
| * Issue #15467: Move helpers for __sizeof__ tests into test_support.Martin v. Löwis2012-07-291-29/+10
| | | | | | | | Patch by Serhiy Storchaka.
* | Issue #15402: Simplify Struct.__sizeof__ and make tests more precise.Meador Inge2012-07-291-10/+41
|\ \ | |/
| * Issue #15402: Simplify Struct.__sizeof__ and make tests more precise.Meador Inge2012-07-291-10/+41
| |
* | MERGE: Better test for Issue #15402: Add a __sizeof__ method to struct.StructJesus Cea2012-07-231-4/+4
|\ \ | |/
| * Better test for Issue #15402: Add a __sizeof__ method to struct.StructJesus Cea2012-07-231-4/+4
| |
* | Issue #15402: Add a __sizeof__ method to struct.Struct.Meador Inge2012-07-231-0/+10
|\ \ | |/ | | | | Initial patch by Serhiy Storchaka.
| * Issue #15402: Add a __sizeof__ method to struct.Struct.Meador Inge2012-07-231-0/+10
| | | | | | | | Initial patch by Serhiy Storchaka.
* | Issue #3163: The struct module gets new format characters 'n' and 'N'Antoine Pitrou2011-10-061-25/+41
|/ | | | supporting C integer types `ssize_t` and `size_t`, respectively.
* #11565: Merge with 3.1.Ezio Melotti2011-03-161-1/+1
|\
| * #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
| |
| * Merged revisions 82637 via svnmerge fromBenjamin Peterson2010-07-071-4/+8
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82637 | benjamin.peterson | 2010-07-07 17:45:06 -0500 (Wed, 07 Jul 2010) | 1 line ValueError in this case is also acceptable ........
| * Merged revisions 82628,82630 via svnmerge fromBenjamin Peterson2010-07-071-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82628 | benjamin.peterson | 2010-07-07 13:44:05 -0500 (Wed, 07 Jul 2010) | 1 line this needn't be in the loop ........ r82630 | benjamin.peterson | 2010-07-07 13:54:59 -0500 (Wed, 07 Jul 2010) | 1 line don't ignore exceptions from PyObject_IsTrue ........
| * Merged revisions 81897-81898,81902 via svnmerge fromMark Dickinson2010-06-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r81897 | mark.dickinson | 2010-06-11 17:56:34 +0100 (Fri, 11 Jun 2010) | 1 line Avoid possible undefined behaviour from signed overflow. ........ r81898 | mark.dickinson | 2010-06-11 20:05:08 +0100 (Fri, 11 Jun 2010) | 1 line Fix an incorrect return type. ........ r81902 | mark.dickinson | 2010-06-11 20:50:30 +0100 (Fri, 11 Jun 2010) | 1 line Fix more undefined-behaviour inducing overflow checks in struct module. ........
| * Merged revisions 78692 via svnmerge fromMark Dickinson2010-03-051-6/+2
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r78692 | mark.dickinson | 2010-03-05 14:44:08 +0000 (Fri, 05 Mar 2010) | 1 line Remove unused imports & clean up sys imports in test_struct. ........
| * Merged revisions 73715 via svnmerge fromGeorg Brandl2009-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | svn+ssh://svn.python.org/python/branches/py3k ........ r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line convert old fail* assertions to assert* ........
* | Issue #10783: struct.pack() doesn't encode implicitly unicode to UTF-8Victor Stinner2010-12-281-57/+46
| | | | | | | | | | | | | | * Replace "bytes" by "bytes object" in struct error messages * Document the API change in What's new in Python 3.2 * Fix test_wave * Remove also ugly implicit conversions in test_struct
* | Issue #8990: array.fromstring() and array.tostring() get renamed toAntoine Pitrou2010-09-011-4/+4
| | | | | | | | | | | | frombytes() and tobytes(), respectively, to avoid confusion. Furthermore, array.frombytes(), array.extend() as well as the array.array() constructor now accept bytearray objects. Patch by Thomas Jollans.
* | Add test for memory leak reported in issue 9422.Mark Dickinson2010-08-011-1/+6
| |
* | Issue #4770: Restrict binascii module to accept only bytes (as specified).Florent Xicluna2010-07-271-0/+1
| | | | | | | | And fix the email package to encode to ASCII instead of ``raw-unicode-escape`` before ASCII-to-binary decoding.
* | Yield more information on failure in test_struct boolean test.Mark Dickinson2010-07-121-2/+7
| |
* | ValueError is eventually what we want to move to, I supposeBenjamin Peterson2010-07-101-2/+2
| |
* | wrapBenjamin Peterson2010-07-091-1/+2
| |
* | allow more exceptionsBenjamin Peterson2010-07-091-3/+3
| |
* | OverflowError is fineBenjamin Peterson2010-07-091-1/+2
| |
* | ValueError in this case is also acceptableBenjamin Peterson2010-07-071-4/+8
| |
* | don't ignore exceptions from PyObject_IsTrueBenjamin Peterson2010-07-071-0/+6
| |
* | this needn't be in the loopBenjamin Peterson2010-07-071-2/+2
| |
* | Fix more undefined-behaviour inducing overflow checks in struct module.Mark Dickinson2010-06-111-0/+2
| |
* | Avoid possible undefined behaviour from signed overflow.Mark Dickinson2010-06-111-0/+5
| |
* | Issue #3129: Trailing digits in format string are no longer ignored.Alexander Belopolsky2010-06-111-1/+27
| |
* | Merged revisions 79745 via svnmerge fromMark Dickinson2010-04-041-10/+31
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79745 | mark.dickinson | 2010-04-04 09:43:04 +0100 (Sun, 04 Apr 2010) | 3 lines Issue #8300 (__index__ handling in struct.pack): Remove redundant check and improve test coverage. Thanks Meador Inge for the patch. ........
* | Merged revisions 79740 via svnmerge fromEzio Melotti2010-04-041-8/+8
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79740 | ezio.melotti | 2010-04-04 10:00:02 +0300 (Sun, 04 Apr 2010) | 1 line Use more specific assert* methods in test_struct. ........
* | Merged revisions 79674 via svnmerge fromMark Dickinson2010-04-031-0/+17
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79674 | mark.dickinson | 2010-04-03 15:05:10 +0100 (Sat, 03 Apr 2010) | 3 lines Issue #8300: Let struct.pack use __index__ to convert and pack non-integers. Based on a patch by Meador Inge. ........
* | Clean up integer tests in test_struct, and bring them more in line with the ↵Mark Dickinson2010-04-031-168/+125
| | | | | | | | trunk tests.
* | Remove unused imports & clean up sys imports in test_struct.Mark Dickinson2010-03-051-6/+2
| |
* | convert old fail* assertions to assert*Benjamin Peterson2009-06-301-2/+2
|/
* Issue #5463: Remove deprecated float coercion from struct module, alongMark Dickinson2009-04-191-58/+15
| | | | | with the _PY_STRUCT_FLOAT_COERCE constant. Simplify tests accordingly, and reenable (now-fixed) broken tests.
* Merged revisions 70837,70864,70878,71004,71032,71043 via svnmerge fromBenjamin Peterson2009-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70837 | gregory.p.smith | 2009-03-31 11:54:10 -0500 (Tue, 31 Mar 2009) | 9 lines The unittest.TestCase.assertEqual() now displays the differences in lists, tuples, dicts and sets on failure. Many new handy type and comparison specific assert* methods have been added that fail with error messages actually useful for debugging. Contributed in by Google and completed with help from mfoord and GvR at PyCon 2009 sprints. Discussion lives in http://bugs.python.org/issue2578. ........ r70864 | gregory.p.smith | 2009-03-31 14:03:28 -0500 (Tue, 31 Mar 2009) | 10 lines Rename the actual method definitions to the official assertFoo names. Adds unittests to make sure the old fail* names continue to work now and adds a comment that they are pending deprecation. Also adds a test to confirm that the plural Equals method variants continue to exist even though we're unlikely to deprecate those. http://bugs.python.org/issue2578 ........ r70878 | gregory.p.smith | 2009-03-31 14:59:14 -0500 (Tue, 31 Mar 2009) | 3 lines Issue an actual PendingDeprecationWarning for the TestCase.fail* methods. Document the deprecation. ........ r71004 | benjamin.peterson | 2009-04-01 18:15:49 -0500 (Wed, 01 Apr 2009) | 1 line remove double underscores ........ r71032 | michael.foord | 2009-04-01 22:20:38 -0500 (Wed, 01 Apr 2009) | 13 lines Better exception messages for unittest assert methods. - unittest.assertNotEqual() now uses the inequality operator (!=) instead of the equality operator. - Default assertTrue and assertFalse messages are now useful. - TestCase has a longMessage attribute. This defaults to False, but if set to True useful error messages are shown in addition to explicit messages passed to assert methods. Issue #5663 ........ r71043 | michael.foord | 2009-04-02 00:51:54 -0500 (Thu, 02 Apr 2009) | 7 lines Store the functions in the _type_equality_funcs as wrapped objects that are deep copyable. This allows for the deep copying of TestCase instances. Issue 5660 ........
* Issue #5463: Remove _PY_STRUCT_RANGE_CHECKING constant from structMark Dickinson2009-03-291-48/+26
| | | | | | module, and remove associated code from test_struct. This was a mechanism for skipping some of the tests for overflow behaviour when packing integers; it's no longer necessary.
* - Issue #5463: In struct module, remove deprecated overflow wrappingMark Dickinson2009-03-211-11/+1
| | | | | | | when packing an integer: for example, struct.pack('=L', -1) now raises struct.error instead of returning b'\xff\xff\xff\xff'. Thanks Andreas Schawo for the patch.
* #3694: fix an "XXX undetected error" leak in struct.Georg Brandl2009-02-131-0/+4
|
* Merged revisions 69498 via svnmerge fromMark Dickinson2009-02-101-2/+2
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69498 | mark.dickinson | 2009-02-10 15:46:50 +0000 (Tue, 10 Feb 2009) | 6 lines Issue #5175: PyLong_AsUnsignedLongLong now raises OverflowError for negative arguments. Previously, it raised TypeError. Thanks Lisandro Dalcin. ........
* Merged revisions 68112,68115,68120,68133,68141-68142,68145-68146,68148-68149 ↵Georg Brandl2009-01-031-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68112 | benjamin.peterson | 2009-01-01 00:48:39 +0100 (Thu, 01 Jan 2009) | 1 line #4795 inspect.isgeneratorfunction() should return False instead of None ........ r68115 | benjamin.peterson | 2009-01-01 05:04:41 +0100 (Thu, 01 Jan 2009) | 1 line simplfy code ........ r68120 | georg.brandl | 2009-01-01 13:15:31 +0100 (Thu, 01 Jan 2009) | 4 lines #4228: Pack negative values the same way as 2.4 in struct's L format. ........ r68133 | antoine.pitrou | 2009-01-01 16:38:03 +0100 (Thu, 01 Jan 2009) | 1 line fill in actual issue number in tests ........ r68141 | benjamin.peterson | 2009-01-01 17:43:12 +0100 (Thu, 01 Jan 2009) | 1 line fix highlighting ........ r68142 | benjamin.peterson | 2009-01-01 18:29:49 +0100 (Thu, 01 Jan 2009) | 2 lines welcome to 2009, Python! ........ r68145 | amaury.forgeotdarc | 2009-01-02 01:03:54 +0100 (Fri, 02 Jan 2009) | 5 lines #4801 _collections module fails to build on cygwin. _PyObject_GC_TRACK is the macro version of PyObject_GC_Track, and according to documentation it should not be used for extension modules. ........ r68146 | ronald.oussoren | 2009-01-02 11:44:46 +0100 (Fri, 02 Jan 2009) | 2 lines Fix for issue4472: "configure --enable-shared doesn't work on OSX" ........ r68148 | ronald.oussoren | 2009-01-02 11:48:31 +0100 (Fri, 02 Jan 2009) | 2 lines Forgot to add a NEWS item in my previous checkin ........ r68149 | ronald.oussoren | 2009-01-02 11:50:48 +0100 (Fri, 02 Jan 2009) | 2 lines Fix for issue4780 ........
* Merged revisions 66321 via svnmerge fromBrett Cannon2008-09-091-2/+2
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r66321 | brett.cannon | 2008-09-08 17:49:16 -0700 (Mon, 08 Sep 2008) | 7 lines warnings.catch_warnings() now returns a list or None instead of the custom WarningsRecorder object. This makes the API simpler to use as no special object must be learned. Closes issue 3781. Review by Benjamin Peterson. ........