bpo-37685: Fixed comparisons of datetime.timedelta and datetime.timezone. (GH-14996)

There was a discrepancy between the Python and C implementations.

Add singletons ALWAYS_EQ, LARGEST and SMALLEST in test.support
to test mixed type comparison.
This commit is contained in:
Serhiy Storchaka 2019-08-04 12:38:46 +03:00 committed by GitHub
parent 5c72badd06
commit 17e52649c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 107 additions and 84 deletions

View file

@ -356,11 +356,28 @@ The :mod:`test.support` module defines the following constants:
Check for presence of docstrings.
.. data:: TEST_HTTP_URL
Define the URL of a dedicated HTTP server for the network tests.
.. data:: ALWAYS_EQ
Object that is equal to anything. Used to test mixed type comparison.
.. data:: LARGEST
Object that is greater than anything (except itself).
Used to test mixed type comparison.
.. data:: SMALLEST
Object that is less than anything (except itself).
Used to test mixed type comparison.
The :mod:`test.support` module defines the following functions: