New submission from Jean-Paul Calderone <exar...@divmod.com>:

Consider this example, based on two doctests from Twisted:

  from doctest import DocTestSuite
  import twisted.web2.stream
  docTestOne = DocTestSuite(twisted.web2.stream)._tests[0]
  import twisted.web2.test.test_stream
  docTestTwo = DocTestSuite(twisted.web2.test.test_stream)._tests[0]
  print docTestOne.id(), '==', docTestTwo.id(), '?'
  print docTestOne == docTestTwo

One might reasonably expect a false result, since the two DocTestCase
instances represent two different doctests.  One will meet with
surprise, though.

----------
components: Library (Lib)
messages: 96368
nosy: exarkun
severity: normal
status: open
title: All DocTestCase instances compare and hash equal to each other
type: behavior
versions: Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7502>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to