From d1ef91dd4919921c6b9c8f58e9dacd8eefa5261d Mon Sep 17 00:00:00 2001 From: Andre Eberle Date: Mon, 17 Apr 2023 19:20:37 -0400 Subject: [PATCH] Added tests for issue #439, global/const issues --- test/bytecode_3.8_run/05_long_literals.pyc | Bin 14537 -> 14651 bytes .../expression/05_long_literals.py | 7 +++++++ 2 files changed, 7 insertions(+) diff --git a/test/bytecode_3.8_run/05_long_literals.pyc b/test/bytecode_3.8_run/05_long_literals.pyc index d599a738c35f30f6e13dc8e43eacbf27685cef0f..665b3767856cd8bb121c49b6f6d009719174abec 100644 GIT binary patch delta 253 zcmX?ExVwlil$V!_0SMYI+otUEoX97`ShP|5J+I6J#*|+`{5yv^iaC`ziv`I3lg%)J zuZSa$VX_pTr^??sicw5J(SJbve*#kqLn!iqt`*6t1tppJdAArVZZTGAvK8q9=2-eN0D%qdMR zzQtTzS$vDVEVZZ@sH#W@D7%uO$QVc!8Bb2vao|wlVPIfk<>J|VP@k81^B(NSBcTNKC%0-u!@$78%EhzU(ZHE$ sa)HsQ%^C)$SeW^^*f%qpzGIxsZ_2azz1e?8mU;#jwn?TA%=bA|0E0CvssI20 diff --git a/test/simple_source/expression/05_long_literals.py b/test/simple_source/expression/05_long_literals.py index 74804f09..b044d694 100644 --- a/test/simple_source/expression/05_long_literals.py +++ b/test/simple_source/expression/05_long_literals.py @@ -725,3 +725,10 @@ values = { } assert sorted(values.values())[1:] == list(range(2, 34)) + + +# Check that we can distinguish names from strings in literal collections, e.g. lists. +# The list has to have more than 4 items go get accumulated in a collection +a = ["y", 'Exception', "x", Exception, "z"] +assert a[1] == "Exception" +assert a[3] == Exception