Commit Graph

13 Commits

Author SHA1 Message Date
Tim Peters ea76c98014 Implemented <, <=, >, >= for sets, giving subset and proper-subset
meanings.  I did not add new, e.g., ispropersubset() methods; we're
going nuts on those, and, e.g., there was no "friendly name" for
== either.
2002-08-25 18:43:10 +00:00
Tim Peters 93d8d48c15 TestSubset(): Generalized the framework to support testing upcoming
<, <=, etc methods too.
2002-08-25 18:21:47 +00:00
Tim Peters 4127e91d20 Rewrote all remaining assert stmts. 2002-08-25 18:02:29 +00:00
Tim Peters 62c62438ff Simplified construction of the test suite. 2002-08-25 17:49:04 +00:00
Tim Peters de830ca4eb Simplified code building sets of characters. 2002-08-25 17:40:29 +00:00
Tim Peters a777799040 Ack! Virtually every test here relied on an assert stmt. assert stmts
should never be used in tests.  Repaired dozens, but more is needed.
2002-08-25 17:38:49 +00:00
Tim Peters 0bbb30830c Simplified the setup for is-subset testing. 2002-08-25 17:22:23 +00:00
Raymond Hettinger e87ab3fefe Removed < <= > >= from the API. Implemented as comparisons of the
underlying dictionaries, there were no reasonable use cases (lexicographic
sorting of a list of sets is somewhat esoteric).  Frees the operators
for other uses (such as strict subset and superset comparisons).

Updated documentation and test suite accordingly.
2002-08-24 07:33:06 +00:00
Raymond Hettinger 1b9f5d4c1a At Tim Peter's suggestion, propagated GvR's binary operator changes to
the inplace operators.  The strategy is to have the operator overloading
code do the work and then to define equivalent method calls which rely on
the operators.  The changes facilitate proper application of TypeError
and NonImplementedErrors.

Added corresponding tests to the test suite to make sure both the operator
and method call versions get exercised.

Add missing tests for difference_update().
2002-08-24 06:19:02 +00:00
Raymond Hettinger 045e51a9a5 Expanded tests for sets of sets. 2002-08-24 02:56:01 +00:00
Raymond Hettinger c3e61e5c52 Add regression test for proper construction of sets of sets. 2002-08-21 06:38:44 +00:00
Guido van Rossum c9196bc88d Rename popitem() to pop(). (An idea from SF patch 597444.) 2002-08-20 21:51:59 +00:00
Guido van Rossum d6cf3af8f7 Set classes and their unit tests, from sandbox. 2002-08-19 16:19:15 +00:00