[Python-checkins] [3.11] Revert "Add tests for empty range equality (GH-103751)" (GH-103770) (#103781)

terryjreedy webhook-mailer at python.org
Mon Apr 24 14:54:29 EDT 2023


https://github.com/python/cpython/commit/a8489f7f264ec34601c48e0996810d96e0ec2464
commit: a8489f7f264ec34601c48e0996810d96e0ec2464
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: terryjreedy <tjreedy at udel.edu>
date: 2023-04-24T18:54:21Z
summary:

[3.11] Revert "Add tests for empty range equality (GH-103751)" (GH-103770) (#103781)

Revert "Add tests for empty range equality (GH-103751)" (GH-103770)

This reverts commit dca27a69a8261353f7f986eb8f808f0d487ac4b7.
Added tests are redundant with existing tests.
(cherry picked from commit ab25c7e3112b24a4cd8cb626bbd924c57af0fe1c)

Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>

files:
M Lib/test/test_range.py

diff --git a/Lib/test/test_range.py b/Lib/test/test_range.py
index 83c830a10047..851ad5b7c2f4 100644
--- a/Lib/test/test_range.py
+++ b/Lib/test/test_range.py
@@ -648,11 +648,6 @@ def test_comparison(self):
                          hash(range(2**200, 2**201, 2**100)))
         self.assertNotEqual(range(2**200, 2**201, 2**100),
                             range(2**200, 2**201 + 1, 2**100))
-        # Empty ranges
-        self.assertEqual(range(32, 16), range(0))
-        self.assertEqual(hash(range(32, 16)), hash(range(0)))
-        self.assertEqual(range(2, 1, 3), range(0))
-        self.assertEqual(hash(range(2, 1, 3)), hash(range(0)))
 
         # Order comparisons are not implemented for ranges.
         with self.assertRaises(TypeError):



More information about the Python-checkins mailing list