diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-11 08:41:23 (GMT) |
---|---|---|
committer | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2019-06-11 08:41:23 (GMT) |
commit | 583ff84351e528976aa93d383e5a81aee9f3bac3 (patch) | |
tree | ae0eeedeb0900f899444b251a9abd3b0a5fc74d4 /Lib/test/test_set.py | |
parent | fe5f8b9ce2e504d4510cc82129d595015d239634 (diff) | |
download | cpython-583ff84351e528976aa93d383e5a81aee9f3bac3.zip cpython-583ff84351e528976aa93d383e5a81aee9f3bac3.tar.gz cpython-583ff84351e528976aa93d383e5a81aee9f3bac3.tar.bz2 |
bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) (GH-13967)
(cherry picked from commit 1f11cf9521114447b3e32e2ac88f075ffaa37555)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Diffstat (limited to 'Lib/test/test_set.py')
-rw-r--r-- | Lib/test/test_set.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py index bb1081f..e4766ab 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): |