summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2019-06-11 02:01:06 -0700
committerGitHub <noreply@github.com>2019-06-11 02:01:06 -0700
commit1b615b2f035d207941e44259a92ed0bdcc56ac45 (patch)
treeb15f171a96c871413d5535b8ee1bbb2c6799a7ac /Lib
parentc59b1bbbb37bbfc7eb7a9386bb51c7fea838fc2a (diff)
downloadcpython-git-1b615b2f035d207941e44259a92ed0bdcc56ac45.tar.gz
[3.7] bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) (GH-13968)
Diffstat (limited to 'Lib')
-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):