[Checkins] SVN: zope.testing/branches/regebro-python3/src/zope/testing/doctest.py py3: cmp-->lt
Wolfgang Schnerring
wosc at wosc.de
Sun Sep 13 04:32:06 EDT 2009
Log message for revision 103885:
py3: cmp-->lt
Changed:
U zope.testing/branches/regebro-python3/src/zope/testing/doctest.py
-=-
Modified: zope.testing/branches/regebro-python3/src/zope/testing/doctest.py
===================================================================
--- zope.testing/branches/regebro-python3/src/zope/testing/doctest.py 2009-09-13 08:31:45 UTC (rev 103884)
+++ zope.testing/branches/regebro-python3/src/zope/testing/doctest.py 2009-09-13 08:32:06 UTC (rev 103885)
@@ -521,12 +521,13 @@
# This lets us sort tests by name:
- def __cmp__(self, other):
+ def __lt__(self, other):
if not isinstance(other, DocTest):
- return -1
- return cmp((self.name, self.filename, self.lineno, id(self)),
- (other.name, other.filename, other.lineno, id(other)))
+ return False
+ return ((self.name, self.filename, self.lineno, id(self)) <
+ (other.name, other.filename, other.lineno, id(other)))
+
######################################################################
## 3. DocTestParser
######################################################################
More information about the checkins
mailing list