1. 24 Agu, 2006 1 kayıt (commit)
    • Guido van Rossum's avatar
      Restructure comparison dramatically. There is no longer a default · 47b9ff6b
      Guido van Rossum yazdı
      *ordering* between objects; there is only a default equality test
      (defined by an object being equal to itself only).  Read the comment
      in object.c.  The current implementation never uses a three-way
      comparison to compute a rich comparison, but it does use a rich
      comparison to compute a three-way comparison.  I'm not quite done
      ripping out all the calls to PyObject_Compare/Cmp, or replacing
      tp_compare implementations with tp_richcompare implementations;
      but much of that has happened (to make most unit tests pass).
      
      The following tests still fail, because I need help deciding
      or understanding:
      
      test_codeop -- depends on comparing code objects
      test_datetime -- need Tim Peters' opinion
      test_marshal -- depends on comparing code objects
      test_mutants -- need help understanding it
      
      The problem with test_codeop and test_marshal is this: these tests
      compare two different code objects and expect them to be equal.
      Is that still a feature we'd like to support?  I've temporarily
      removed the comparison and hash code from code objects, so they
      use the default (equality by pointer only) comparison.
      
      For the other two tests, run them to see for yourself.
      (There may be more failing test with "-u all".)
      
      A general problem with getting lots of these tests to pass is
      the reality that for object types that have a natural total ordering,
      implementing __cmp__ is much more convenient than implementing
      __eq__, __ne__, __lt__, and so on.  Should we go back to allowing
      __cmp__ to provide a total ordering?  Should we provide some other
      way to implement rich comparison with a single method override?
      Alex proposed a __key__() method; I've considered a __richcmp__()
      method.  Or perhaps __cmp__() just shouldn't be killed off...
      47b9ff6b
  2. 24 Kas, 2005 1 kayıt (commit)
    • Neal Norwitz's avatar
      Fix typo in comment. · 2fcf206a
      Neal Norwitz yazdı
      Delete globals which contain variable information at the end of the test.
      This makes the test stable (no reported leaks) when running regrtest -R
      to find reference leaks.
      2fcf206a
  3. 15 May, 2005 1 kayıt (commit)
    • Armin Rigo's avatar
      This test relied on short-circuiting details of dictobject.py to avoid · 57179fee
      Armin Rigo yazdı
      crashing, and indirectly on the fact that hash codes in
      random.randrange(1000000000) were very unlikely to exhibit collisions.
      To see the problem, replace this number with 500 and observe the crash on
      either del target[key] or del keys[i].
      
      The fix prevents recursive mutation, just as in the key insertion case.
      57179fee
  4. 23 Tem, 2002 1 kayıt (commit)
    • Barry Warsaw's avatar
      Get rid of relative imports in all unittests. Now anything that · 04f357cf
      Barry Warsaw yazdı
      imports e.g. test_support must do so using an absolute package name
      such as "import test.test_support" or "from test import test_support".
      
      This also updates the README in Lib/test, and gets rid of the
      duplicate data dirctory in Lib/test/data (replaced by
      Lib/email/test/data).
      
      Now Tim and Jack can have at it. :)
      04f357cf
  5. 03 Haz, 2001 1 kayıt (commit)
  6. 02 Haz, 2001 2 kayıt (commit)
  7. 10 May, 2001 3 kayıt (commit)
    • Tim Peters's avatar
      Make test_mutants stronger by also adding random keys during comparisons. · 4c02fecf
      Tim Peters yazdı
      A Mystery:  test_mutants ran amazingly slowly even before dictobject.c
      "got fixed".  I don't have a clue as to why.  dict comparison was and
      remains linear-time in the size of the dicts, and test_mutants only tries
      100 dict pairs, of size averaging just 50.  So "it should" run in less than
      an eyeblink; but it takes at least a second on this 800MHz box.
      4c02fecf
    • Tim Peters's avatar
      Repair typos in comments. · 8c3e91ef
      Tim Peters yazdı
      8c3e91ef
    • Tim Peters's avatar
      SF bug #422121 Insecurities in dict comparison. · 95bf9390
      Tim Peters yazdı
      Fixed a half dozen ways in which general dict comparison could crash
      Python (even cause Win98SE to reboot) in the presence of kay and/or
      value comparison routines that mutate the dict during dict comparison.
      Bugfix candidate.
      95bf9390