diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2020-05-15 01:04:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-15 01:04:52 (GMT) |
commit | 16ab07063cb564c1937714bd39d6915172f005b5 (patch) | |
tree | f536d329aa196ac4755d3407a698dae48f9bb7b5 /Lib/test/test_dictcomps.py | |
parent | 7ba1f75f3f02b4b50ac6d7e17d15e467afa36aac (diff) | |
download | cpython-16ab07063cb564c1937714bd39d6915172f005b5.zip cpython-16ab07063cb564c1937714bd39d6915172f005b5.tar.gz cpython-16ab07063cb564c1937714bd39d6915172f005b5.tar.bz2 |
bpo-40334: Correctly identify invalid target in assignment errors (GH-20076)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Diffstat (limited to 'Lib/test/test_dictcomps.py')
-rw-r--r-- | Lib/test/test_dictcomps.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_dictcomps.py b/Lib/test/test_dictcomps.py index 16aa651..472e3df 100644 --- a/Lib/test/test_dictcomps.py +++ b/Lib/test/test_dictcomps.py @@ -77,7 +77,7 @@ class DictComprehensionTest(unittest.TestCase): compile("{x: y for y, x in ((1, 2), (3, 4))} = 5", "<test>", "exec") - with self.assertRaisesRegex(SyntaxError, "cannot assign"): + with self.assertRaisesRegex(SyntaxError, "illegal expression"): compile("{x: y for y, x in ((1, 2), (3, 4))} += 5", "<test>", "exec") |