diff options
| author | Simon Charette <charette.s@gmail.com> | 2024-07-17 14:52:08 -0400 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-07-18 08:41:55 +0200 |
| commit | 8fb7d30456d664b336d602db2085af1f6433ab35 (patch) | |
| tree | 0a1a60f9f8e32d4326802d5f9b085f1302398fca /tests | |
| parent | 5eef80b56e8b3635a071d644fcc9acacdd71025c (diff) | |
[5.1.x] Fixed #35603 -- Prevented F.__contains__() from hanging.
Regression in 94b6f101f7dc363a8e71593570b17527dbb9f77f.
Backport of 6b3f55446fdc62bd277903fd188a1781e4d92d29 from main.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/expressions/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py index 3538900092..64103f14db 100644 --- a/tests/expressions/tests.py +++ b/tests/expressions/tests.py @@ -1302,6 +1302,11 @@ class FTests(SimpleTestCase): self.assertNotEqual(f, value) self.assertNotEqual(value, f) + def test_contains(self): + msg = "argument of type 'F' is not iterable" + with self.assertRaisesMessage(TypeError, msg): + "" in F("name") + class ExpressionsTests(TestCase): def test_F_reuse(self): |
