summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2019-06-11 01:15:24 -0700
committerGitHub <noreply@github.com>2019-06-11 01:15:24 -0700
commit1f11cf9521114447b3e32e2ac88f075ffaa37555 (patch)
tree5ae0cb114a30299b34a32db228d13017bf5e3bf5 /Lib/test
parent408a2ef1aceff1f4270c44552fa39ef93d9283e3 (diff)
downloadcpython-git-1f11cf9521114447b3e32e2ac88f075ffaa37555.tar.gz
bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_set.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index bb1081f034..e4766ab190 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -895,6 +895,12 @@ class TestBasicOps:
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):