From deebbb044d02876b924deb689b7b0b7c3f889ede Mon Sep 17 00:00:00 2001 From: Adrian Haensler Date: Sat, 30 Jul 2022 00:02:47 -0500 Subject: [PATCH] add a test --- tests/compiled/test_for_loop_py3.8.3.10.pyc | Bin 0 -> 611 bytes tests/input/test_for_loop_py3.8.py | 19 +++++++++++++++++++ tests/tokenized/test_for_loop_py3.8.txt | 13 +++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 tests/compiled/test_for_loop_py3.8.3.10.pyc create mode 100644 tests/input/test_for_loop_py3.8.py create mode 100644 tests/tokenized/test_for_loop_py3.8.txt diff --git a/tests/compiled/test_for_loop_py3.8.3.10.pyc b/tests/compiled/test_for_loop_py3.8.3.10.pyc new file mode 100644 index 0000000000000000000000000000000000000000..473b3f804459f30aae4be9377886b3670410dc56 GIT binary patch literal 611 zcmY*W&2H2%5VrTHtSqh66I|!W9+E(j03n1pR7hMeKKF zJjz};z=c=ffEe#~`LQ)4fAjl|2bW91=$wA}UVP<@eT(4VGbQkv#6Kma*qSM>_~pb2 z&DG?V^8LtdfF4WiATq|Z}3LXv>T-jy1n zTf9M+M7M`pe$r6ZvfF3{O$T-iHFglw;G*7#gX|QXy%!Jb5UhWZWt%3{eUX;fX4g($ zWp*r8nc3c$?Bv;_6-cG1U8}+O)}jlkcpE?(k5DyN+Jgk^urRuXfhs{qlw$WP*>xiB zP#7#PeJaF7-S`7_dRgfLU= QYQ`4J1&>$o*{>P@4FbBkYybcN literal 0 HcmV?d00001 diff --git a/tests/input/test_for_loop_py3.8.py b/tests/input/test_for_loop_py3.8.py new file mode 100644 index 0000000..bad3ee7 --- /dev/null +++ b/tests/input/test_for_loop_py3.8.py @@ -0,0 +1,19 @@ +""" +test_for_loop_3.8.py -- source test +For-loops have changed in python 3.8. The test and PR +(https://github.com/zrax/pycdc/pull/270) add some support. +It also fixes a problem with nested if- and for blocks. + +This source is part of the decompyle test suite. + +decompyle is a Python byte-code decompiler +See http://www.goebel-consult.de/decompyle/ for download and +for further information +""" + +if 1 == 1: + print('block1') +if 1 == 1: + for a in 'foo': + print('block2') +return None diff --git a/tests/tokenized/test_for_loop_py3.8.txt b/tests/tokenized/test_for_loop_py3.8.txt new file mode 100644 index 0000000..0fd636a --- /dev/null +++ b/tests/tokenized/test_for_loop_py3.8.txt @@ -0,0 +1,13 @@ +'\ntest_for_loop_3.8.py -- source test\nFor-loops have changed in python 3.8. The test and PR\n(https://github.com/zrax/pycdc/pull/270) add some support.\nIt also fixes a problem with nested if- and for blocks.\n\nThis source is part of the decompyle test suite.\n\ndecompyle is a Python byte-code decompiler\nSee http://www.goebel-consult.de/decompyle/ for download and\nfor further information\n' +if 1 == 1 : + +print ( 'block1' ) + +if 1 == 1 : + +for a in 'foo' : + +print ( 'block2' ) + + +return None