Commit Graph

115 Commits

Author SHA1 Message Date
Serhiy Storchaka ab8a5beb5f
Fix links to old SF bugs (#95648) 2022-08-04 18:12:35 +02:00
Serhiy Storchaka 086c6b1b0f
bpo-45046: Support context managers in unittest (GH-28045)
Add methods enterContext() and enterClassContext() in TestCase.
Add method enterAsyncContext() in IsolatedAsyncioTestCase.
Add function enterModuleContext().
2022-05-08 17:49:09 +03:00
Serhiy Storchaka 884eba3c76
bpo-26579: Add object.__getstate__(). (GH-2821)
Copying and pickling instances of subclasses of builtin types
bytearray, set, frozenset, collections.OrderedDict, collections.deque,
weakref.WeakSet, and datetime.tzinfo now copies and pickles instance attributes
implemented as slots.
2022-04-06 20:00:14 +03:00
Dennis Sweeney 4a66615ba7
bpo-46615: Don't crash when set operations mutate the sets (GH-31120)
Ensure strong references are acquired whenever using `set_next()`. Added randomized test cases for `__eq__` methods that sometimes mutate sets when called.
2022-02-11 11:25:08 -05:00
Serhiy Storchaka ad4857884b
bpo-43413: Revert changes in set.__init__ (GH-28403)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-12-26 13:27:01 +02:00
Serhiy Storchaka 92bf8691fb
bpo-43413: Fix handling keyword arguments in subclasses of some buitin classes (GH-26456)
* Constructors of subclasses of some buitin classes (e.g. tuple, list,
  frozenset) no longer accept arbitrary keyword arguments.
* Subclass of set can now define a __new__() method with additional
  keyword parameters without overriding also __init__().
2021-09-12 13:27:50 +03:00
Serhiy Storchaka 2a8127cafe
bpo-25130: Add calls of gc.collect() in tests to support PyPy (GH-28005) 2021-08-29 14:04:40 +03:00
Dong-hee Na 5a3108044d
bpo-28395: Remove unnecessary semicolons in tests (GH-26868) 2021-06-23 18:01:06 +09:00
Hai Shi deb016224c
bpo-40275: Use new test.support helper submodules in tests (GH-21317) 2020-07-06 14:29:49 +02:00
Raymond Hettinger f9bd05e83e
bpo-40521: Empty frozenset is no longer a singleton (GH-21085)
* Revert "bpo-40521: Make the empty frozenset per interpreter (GH-21068)"

This reverts commit 261cfedf76.

* bpo-40521: Empty frozensets are no longer singletons

* Complete the removal of the frozenset singleton
2020-06-23 17:42:55 +02:00
Serhiy Storchaka f9bab74d5b
bpo-41055: Remove outdated tests for the tp_print slot. (GH-21006) 2020-06-21 11:11:17 +03:00
Raymond Hettinger 1f11cf9521
bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) 2019-06-11 01:15:24 -07:00
Serhiy Storchaka 70d28a184c Remove unused imports. 2016-12-16 20:00:15 +02:00
Raymond Hettinger 4e17e04237 Issue #26163: Disable periodically failing test which was overly demanding of the frozenset hash function effectiveness 2016-11-21 16:59:04 -08:00
Raymond Hettinger 4c483ad52b Merge 2016-09-08 14:45:40 -07:00
Martin Panter 3e04d5b306 Issue #27076: Merge spelling from 3.5 2016-05-26 06:03:19 +00:00
Martin Panter 46f50726a0 Issue #27076: Doc, comment and tests spelling fixes
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-26 05:35:26 +00:00
Serhiy Storchaka c7f44aa99a Issue #23277: Remove more unused sys and os imports. 2016-04-24 13:25:01 +03:00
Serhiy Storchaka ab479c49d3 Issue #26494: Fixed crash on iterating exhausting iterators.
Affected classes are generic sequence iterators, iterators of str, bytes,
bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
views and os.scandir() iterator.
2016-03-30 20:41:15 +03:00
Serhiy Storchaka fbb1c5ee06 Issue #26494: Fixed crash on iterating exhausting iterators.
Affected classes are generic sequence iterators, iterators of str, bytes,
bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
views and os.scandir() iterator.
2016-03-30 20:40:02 +03:00
Raymond Hettinger 455b5092a1 Add more tests of hash effectiveness. 2015-08-09 00:35:00 -07:00
Raymond Hettinger a3626bc5bd Issue #24583: Fix crash when set is mutated while being updated. 2015-07-15 23:50:14 -07:00
Serhiy Storchaka 9e7a0468ef Added regression test for issue24581. 2015-07-08 23:02:18 +03:00
Serhiy Storchaka af320b389b Added regression test for issue24581. 2015-07-08 22:58:55 +03:00
Serhiy Storchaka 65ee4674e2 Issue #22777: Test pickling with all protocols. 2014-12-15 14:06:02 +02:00
Serhiy Storchaka bad1257c96 Issue #22777: Test pickling with all protocols. 2014-12-15 14:03:42 +02:00
Philip Jenvey 1226db4651 fix the description of bytes tests 2014-04-18 11:10:50 -07:00
Serhiy Storchaka 43767638a9 Issue #18702: All skipped tests now reported as skipped. 2013-11-03 21:31:38 +02:00
Tim Peters f4ecfae75f Merge 3.3 into default.
Issue 18944:  fix a 1-character typo in test_set.py.

The error caused test_inline_methods() to test much less than intended.
Caught (& fixed) by Armin Rigo.
2013-09-06 15:42:47 -05:00
Tim Peters 23d7d4e85c Issue 18944: fix a 1-character typo in test_set.py.
The error caused test_inline_methods() to test much less than intended.
Caught (& fixed) by Armin Rigo.
2013-09-06 15:41:30 -05:00
Ezio Melotti 77badf32c9 #17790: merge with 3.3. 2013-04-19 05:59:17 +03:00
Ezio Melotti ab5ba7918e #17790: test_set now works with unittest test discovery. Patch by Zachary Ware. 2013-04-19 05:58:44 +03:00
Armin Ronacher aa9a79d279 Issue #16148: implemented PEP 424 2012-10-06 14:03:24 +02:00
Kristján Valur Jónsson 31668b8f7a Issue #14288: Serialization support for builtin iterators. 2012-04-03 10:49:41 +00:00
Georg Brandl 09a7c72cad Merge from 3.1: Issue #13703: add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.

The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 21:31:46 +01:00
Georg Brandl 2daf6ae249 Issue #13703: add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.

The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
2012-02-20 19:54:16 +01:00
Éric Araujo 48049911d6 Fix obscure set crashers (#8420). Backport of d56b3cafb1e6, reviewed by Raymond. 2011-03-23 02:08:07 +01:00
Ezio Melotti 4969f709cc #11515: Merge with 3.1. 2011-03-15 05:59:46 +02:00
Ezio Melotti 42da663e6f #11515: fix several typos. Patch by Piotr Kasprzyk. 2011-03-15 05:18:48 +02:00
Éric Araujo 1138eba3df Fix accidental suppression in r84537 2010-09-05 18:59:49 +00:00
Éric Araujo 23eae8646c Make naming consistent 2010-09-05 18:43:07 +00:00
Raymond Hettinger faf7b7f4ec Issue 8420: Fix obscure set crashers. 2010-09-03 10:00:50 +00:00
Georg Brandl 44c58236d7 Merged revisions 83385-83389,83391 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r83385 | georg.brandl | 2010-08-01 08:42:45 +0200 (So, 01 Aug 2010) | 1 line

  #8773: mailbox.py does not need to be executable.
........
  r83386 | georg.brandl | 2010-08-01 08:44:46 +0200 (So, 01 Aug 2010) | 1 line

  #8768: name test method properly so that it gets executed.
........
  r83387 | georg.brandl | 2010-08-01 08:53:28 +0200 (So, 01 Aug 2010) | 1 line

  #8735: better explain semantics of *values* argument for parse().
........
  r83388 | georg.brandl | 2010-08-01 09:48:43 +0200 (So, 01 Aug 2010) | 1 line

  #7395: fix traceback in do_add() when no stats are loaded.  Apply same fix for do_sort() and do_reverse().
........
  r83389 | georg.brandl | 2010-08-01 09:57:47 +0200 (So, 01 Aug 2010) | 1 line

  Small improvements to pstats browser: do not crash on reading invalid file, and actually do a reload when executing "read" as intended.
........
  r83391 | georg.brandl | 2010-08-01 10:10:08 +0200 (So, 01 Aug 2010) | 1 line

  Add another news entry.
........
2010-08-01 19:04:55 +00:00
Georg Brandl 33b6a31c18 #8768: name test method properly so that it gets executed. 2010-08-01 06:44:46 +00:00
Raymond Hettinger 3fb156caa4 Issue 8436: set.__init__ accepts keyword args 2010-04-18 23:05:22 +00:00
Raymond Hettinger dbe961215a Issue 8436: set.__init__ accepts keyword args 2010-04-18 23:03:16 +00:00
Brett Cannon 241bd9827b Clean up the warnings filter use in test_set. 2010-03-20 21:55:48 +00:00
Georg Brandl 1b37e8728c Merged revisions 78093 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78093 | georg.brandl | 2010-02-07 18:03:15 +0100 (So, 07 Feb 2010) | 1 line

  Remove unused imports in test modules.
........
2010-03-14 10:45:50 +00:00
Victor Stinner 08b36bdab4 Merged revisions 78886 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78886 | victor.stinner | 2010-03-13 01:13:22 +0100 (sam., 13 mars 2010) | 2 lines

  Issue #7818: set().test_c_api() doesn't expect a set('abc'), modify the set.
........
2010-03-13 00:19:17 +00:00
Benjamin Peterson 577473fe68 use assert[Not]In where appropriate
A patch from Dave Malcolm.
2010-01-19 00:09:57 +00:00