mirror of
https://github.com/python/cpython.git
synced 2025-11-03 15:11:34 +00:00
bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965)
This commit is contained in:
parent
408a2ef1ac
commit
1f11cf9521
3 changed files with 7 additions and 8 deletions
|
|
@ -895,6 +895,12 @@ def test_pickling(self):
|
|||
self.assertEqual(self.set, copy,
|
||||
"%s != %s" % (self.set, copy))
|
||||
|
||||
def test_issue_37219(self):
|
||||
with self.assertRaises(TypeError):
|
||||
set().difference(123)
|
||||
with self.assertRaises(TypeError):
|
||||
set().difference_update(123)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
class TestBasicOpsEmpty(TestBasicOps, unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue