summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_set.py
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions 83385-83389,83391 via svnmerge fromGeorg Brandl2010-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@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. ........
* Issue 8436: set.__init__ accepts keyword argsRaymond Hettinger2010-04-181-0/+2
|
* #7092 - Silence more py3k deprecation warnings, using ↵Florent Xicluna2010-03-211-0/+4
| | | | test_support.check_py3k_warnings() helper.
* #7092: silence some more py3k warnings.Ezio Melotti2010-03-171-15/+11
|
* Issue #7818: set().test_c_api() doesn't expect a set('abc'), modify the set.Victor Stinner2010-03-131-1/+1
|
* Remove unused imports in test modules.Georg Brandl2010-02-071-2/+0
|
* use assert[Not]In where appropriateEzio Melotti2010-01-231-31/+31
|
* Reverting the Revision: 77368. I committed Flox's big patch for tests bySenthil Kumaran2010-01-081-20/+19
| | | | mistake. ( It may come in for sure tough)
* Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. ↵Senthil Kumaran2010-01-081-19/+20
| | | | Patch by flox
* Issue 6573: Fix set.union() for cases where self is in the argument chain.Raymond Hettinger2009-07-271-0/+4
|
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-55/+55
|
* fill in actual issue number in testsAntoine Pitrou2009-01-011-1/+1
|
* Issue #3680: Reference cycles created through a dict, set or deque iterator ↵Antoine Pitrou2009-01-011-2/+15
| | | | did not get collected.
* Issue #4740: Use HIGHEST_PROTOCOL in pickle test.Hirokazu Yamamoto2008-12-271-1/+1
| | | | (There is no behavior difference in 2.x because HIGHEST_PROTOCOL == 2)
* #4069: aSet.remove(otherSet) would always report the empty frozenset([]) as ↵Amaury Forgeot d'Arc2008-10-071-0/+11
| | | | | | | | the missing key. Now it correctly refers to the initial otherset. Reviewed by Raymond. Will backport to 2.6.
* Multi-arg form for set.difference() and set.difference_update().Raymond Hettinger2008-06-111-0/+14
|
* Handle the case with zero arguments.Raymond Hettinger2008-06-111-0/+6
|
* Let set.intersection() and set.intersection_update() take multiple input ↵Raymond Hettinger2008-06-091-0/+6
| | | | arguments.
* Let set.union() and set.update() accept multiple inputs.Raymond Hettinger2008-06-091-0/+7
|
* Don't try to close a non-open file.Neal Norwitz2008-03-251-4/+4
| | | | Don't let file removal cause the test to fail.
* Expand tests to include nested graph structures.Raymond Hettinger2008-01-241-0/+106
|
* Add set.isdisjoint()Raymond Hettinger2007-11-081-2/+47
|
* Whitespace normalization. Ugh, we really need to do this more often.Neal Norwitz2007-04-251-1/+1
| | | | You might want to review this change as it's my first time. Be gentle. :-)
* Add test and fix for fromkeys() optional argument.Raymond Hettinger2007-03-211-0/+3
|
* Extend work on rev 52962 and 53829 eliminating redundant PyObject_Hash() ↵Raymond Hettinger2007-03-201-0/+4
| | | | calls and fixing set/dict interoperability.
* Whitespace normalization.Tim Peters2007-03-121-2/+2
|
* Extend work on revision 52962: Eliminate redundant calls to PyObject_Hash().Raymond Hettinger2007-02-191-0/+20
|
* Whitespace normalization.Tim Peters2007-01-301-2/+2
|
* SF #1486663 -- Allow keyword args in subclasses of set() and frozenset().Raymond Hettinger2007-01-111-0/+11
|
* For sets with cyclical reprs, emit an ellipsis instead of infinitely recursing.Raymond Hettinger2006-12-301-0/+26
|
* Add test for SF bug 1576657Raymond Hettinger2006-12-081-0/+11
|
* Try to repair more new buildbot failures in "x86 OpenBSD trunk", dueTim Peters2006-04-111-1/+1
| | | | | | | | | | | | | | | | to that id() can now return a Python long on a 32-bit box that allocates addresses "with the sign bit set". test_set.py test_subclass_with_custom_hash(): it's never been portably legal for a __hash__() method to return id(self), but on 32-bit boxes that never caused a problem before it became possible for id() to return a Python long. Changed __hash__ here to return a Python int regardless of platform. test_descr.py specials(): vereq(hash(c1), id(c1)) has never been a correct test -- just removed it (hash() is always a Python int; id() may be a Python long).
* SF patch #1458476 with modifications based on discussions in python-dev. ThisBarry Warsaw2006-03-301-1/+1
| | | | | | adds the following API calls: PySet_Clear(), _PySet_Next(), and _PySet_Update(). The latter two are considered non-public. Tests and documentation (for the public API) are included.
* Renamed _length_cue() to __length_hint__(). See:Armin Rigo2006-02-111-1/+3
| | | | http://mail.python.org/pipermail/python-dev/2006-February/060524.html
* Improve test coverage. Hope the test_file changes work the same on windows.Neal Norwitz2005-11-271-0/+12
|
* No longer ignore exceptions raised by comparisons during key lookup.Raymond Hettinger2005-09-161-0/+17
| | | | Inspired by Armin Rigo's suggestion to do the same with dictionaries.
* Numerous fix-ups to C API and docs. Added tests for C API.Raymond Hettinger2005-08-161-1/+6
|
* * Fix SF #1257731. Make __contains__(), remove(), and discard() only doRaymond Hettinger2005-08-121-0/+13
| | | | | | | a frozenset conversion when the initial search attempt fails with a TypeError and the key is some type of set. Add a testcase. * Eliminate a duplicate if-stmt.
* * Add short-circuit code for in-place operations with self (such asRaymond Hettinger2005-08-111-0/+12
| | | | | | | | | | | | | | | | | | | | | s|=s, s&=s, s-=s, or s^=s). Add related tests. * Improve names for several variables and functions. * Provide alternate table access functions (next, contains, add, and discard) that work with an entry argument instead of just a key. This improves set-vs-set operations because we already have a hash value for each key and can avoid unnecessary calls to PyObject_Hash(). Provides a 5% to 20% speed-up for quick hashing elements like strings and integers. Provides much more substantial improvements for slow hashing elements like tuples or objects defining a custom __hash__() function. * Have difference operations resize() when 1/5 of the elements are dummies. Formerly, it was 1/6. The new ratio triggers less frequently and only in cases that it can resize quicker and with greater benefit. The right answer is probably either 1/4, 1/5, or 1/6. Picked the middle value for an even trade-off between resize time and the space/time costs of dummy entries.
* * Improve code for the empty frozenset singleton:Raymond Hettinger2005-08-011-0/+20
| | | | | | | | | | | - Handle both frozenset() and frozenset([]). - Do not use singleton for frozenset subclasses. - Finalize the singleton. - Add test cases. * Factor-out set_update_internal() from set_update(). Simplifies the code for several internal callers. * Factor constant expressions out of loop in set_merge_internal(). * Minor comment touch-ups.
* Add test for hash commutativity.Raymond Hettinger2005-07-051-0/+10
|
* SF patch #1200018: Restore GC support to set objectsRaymond Hettinger2005-06-181-0/+10
| | | | | Reverts 1.26 and 1.27. And adds cycle testing.
* SF 1062353: set pickling problemsRaymond Hettinger2004-11-091-3/+9
| | | | Support automatic pickling of dictionaries in instance of set subclasses.
* Use Py_CLEAR(). Add unrelated test.Raymond Hettinger2004-09-281-0/+3
|
* Use floor division operator.Raymond Hettinger2004-09-271-1/+1
|
* * fix the print testRaymond Hettinger2004-07-091-0/+14
| | | | * add more __init__ tests
* Make sets and deques weak referencable.Raymond Hettinger2004-05-301-0/+8
|
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-2/+2
| | | | From SF patch #852334.
* Whitespace normalization.Tim Peters2004-01-181-1/+1
|
* Strengthen the test for hash effectivenessRaymond Hettinger2003-12-311-4/+4
|