diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-11-20 17:27:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-20 17:27:16 (GMT) |
commit | 97f1efb6062188645a470daaa91e3669d739c75f (patch) | |
tree | 52b5013f014bcd50af40156270fe12e3fc7a5b83 /Lib/test/test_dictcomps.py | |
parent | 6c48bf2d9e1e18dfbfa35f7582ddd32f11f75129 (diff) | |
download | cpython-97f1efb6062188645a470daaa91e3669d739c75f.zip cpython-97f1efb6062188645a470daaa91e3669d739c75f.tar.gz cpython-97f1efb6062188645a470daaa91e3669d739c75f.tar.bz2 |
bpo-35169: Improve error messages for forbidden assignments. (GH-10342)
Diffstat (limited to 'Lib/test/test_dictcomps.py')
-rw-r--r-- | Lib/test/test_dictcomps.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_dictcomps.py b/Lib/test/test_dictcomps.py index 0873071..afe68a8 100644 --- a/Lib/test/test_dictcomps.py +++ b/Lib/test/test_dictcomps.py @@ -73,11 +73,11 @@ class DictComprehensionTest(unittest.TestCase): self.assertEqual(v, "Local variable") def test_illegal_assignment(self): - with self.assertRaisesRegex(SyntaxError, "can't assign"): + with self.assertRaisesRegex(SyntaxError, "cannot assign"): compile("{x: y for y, x in ((1, 2), (3, 4))} = 5", "<test>", "exec") - with self.assertRaisesRegex(SyntaxError, "can't assign"): + with self.assertRaisesRegex(SyntaxError, "cannot assign"): compile("{x: y for y, x in ((1, 2), (3, 4))} += 5", "<test>", "exec") |