8000 tests: Get cmdline verbose tests running again. · sparkfun/circuitpython@bb954d8 · GitHub
[go: up one dir, main page]

Skip to content

Commit bb954d8

Browse files
committed
tests: Get cmdline verbose tests running again.
The showbc function now no longer uses the system printf so works correctly.
1 parent fbddea9 commit bb954d8

File tree

3 files changed

+19
-26
lines changed

3 files changed

+19
-26
lines changed

tests/cmdline/cmd_showbc.py.exp

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Raw bytecode (code_info_size=\\d\+, bytecode_size=\\d\+):
55
arg names:
66
(N_STATE 3)
77
(N_EXC_STACK 0)
8-
bc=-3 line=1
8+
bc=-1 line=1
99
########
1010
bc=\\d\+ line=134
1111
00 MAKE_FUNCTION \.\+
@@ -34,7 +34,7 @@ arg names:
3434
(INIT_CELL 14)
3535
(INIT_CELL 15)
3636
(INIT_CELL 16)
37-
bc=-6 line=1
37+
bc=-4 line=1
3838
########
3939
bc=\\d\+ line=118
4040
00 LOAD_CONST_NONE
@@ -86,8 +86,7 @@ arg names:
8686
\\d\+ UNARY_OP 4
8787
\\d\+ STORE_FAST 9
8888
\\d\+ LOAD_FAST 0
89-
\\d\+ UNARY_OP 0
90-
\\d\+ NOT
89+
\\d\+ UNARY_OP 6
9190
\\d\+ STORE_FAST 10
9291
\\d\+ LOAD_FAST 0
9392
\\d\+ LOAD_DEREF 14
@@ -108,8 +107,7 @@ arg names:
108107
\\d\+ LOAD_DEREF 14
109108
\\d\+ LOAD_FAST 1
110109
\\d\+ BINARY_OP 27 __eq__
111-
\\d\+ UNARY_OP 0
112-
\\d\+ NOT
110+
\\d\+ UNARY_OP 6
113111
\\d\+ STORE_FAST 10
114112
\\d\+ LOAD_DEREF 14
115113
\\d\+ LOAD_ATTR c (cache=0)
@@ -318,7 +316,7 @@ Raw bytecode (code_info_size=\\d\+, bytecode_size=\\d\+):
318316
arg names:
319317
(N_STATE 2)
320318
(N_EXC_STACK 0)
321-
bc=-3 line=1
319+
bc=-1 line=1
322320
bc=0 line=129
323321
bc=3 line=130
324322
bc=6 line=131
@@ -342,14 +340,14 @@ Raw bytecode (code_info_size=\\d\+, bytecode_size=\\d\+):
342340
arg names:
343341
(N_STATE 1)
344342
(N_EXC_STACK 0)
345-
bc=-3 line=1
346-
bc=10 line=135
343+
bc=-1 line=1
10000
344+
bc=13 line=135
347345
00 LOAD_NAME __name__ (cache=0)
348-
03 STORE_NAME __module__
349-
05 LOAD_CONST_STRING 'Class'
350-
08 STORE_NAME __qualname__
351-
10 LOAD_CONST_NONE
352-
11 RETURN_VALUE
346+
04 STORE_NAME __module__
347+
07 LOAD_CONST_STRING 'Class'
348+
10 STORE_NAME __qualname__
349+
13 LOAD_CONST_NONE
350+
14 RETURN_VALUE
353351
File cmdline/cmd_showbc.py, code block '<genexpr>' (descriptor: \.\+, bytecode @\.\+ bytes)
354352
Raw bytecode (code_info_size=\\d\+, bytecode_size=\\d\+):
355353
########
@@ -384,7 +382,7 @@ arg names: * * *
384382
07 LOAD_DEREF 1
385383
09 POP_JUMP_IF_FALSE 3
386384
12 LOAD_DEREF 0
387-
14 LIST_APPEND 2
385+
14 STORE_COMP 8
388386
16 JUMP 3
389387
19 RETURN_VALUE
390388
File cmdline/cmd_showbc.py, code block '<dictcomp>' (descriptor: \.\+, bytecode @\.\+ bytes)
@@ -404,7 +402,7 @@ arg names: * * *
404402
09 POP_JUMP_IF_FALSE 3
405403
12 LOAD_DEREF 0
406404
14 LOAD_DEREF 0
407-
16 MAP_ADD 2
405+
16 STORE_COMP 13
408406
18 JUMP 3
409407
21 RETURN_VALUE
410408
File cmdline/cmd_showbc.py, code block 'closure' (descriptor: \.\+, bytecode @\.\+ bytes)
@@ -443,4 +441,4 @@ arg names: * b
443441
mem: total=\\d\+, current=\\d\+, peak=\\d\+
444442
stack: \\d\+ out of \\d\+
445443
GC: total: \\d\+, used: \\d\+, free: \\d\+
446-
No. of 1-blocks: \\d\+, 2-blocks: \\d\+, max blk sz: \\d\+
444+
No. of 1-blocks: \\d\+, 2-blocks: \\d\+, max blk sz: \\d\+, max free sz: \\d\+

tests/cmdline/cmd_verbose.py.exp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
1
21
File cmdline/cmd_verbose.py, code block '<module>' (descriptor: \.\+, bytecode \.\+ bytes)
32
Raw bytecode (code_info_size=\\d\+, 8000 bytecode_size=\\d\+):
4-
08 \.\+
3+
02 \.\+
54
########
65
\.\+5b
76
arg names:
87
(N_STATE 2)
98
(N_EXC_STACK 0)
10-
bc=-3 line=1
9+
bc=-1 line=1
1110
bc=0 line=3
1211
00 LOAD_NAME print (cache=0)
1312
04 LOAD_CONST_SMALL_INT 1
1413
05 CALL_FUNCTION n=1 nkw=0
1514
07 POP_TOP
1615
08 LOAD_CONST_NONE
1716
09 RETURN_VALUE
17+
1
1818
mem: total=\\d\+, current=\\d\+, peak=\\d\+
1919
stack: \\d\+ out of \\d\+
2020
GC: total: \\d\+, used: \\d\+, free: \\d\+
21-
No. of 1-blocks: \\d\+, 2-blocks: \\d\+, max blk sz: \\d\+
21+
No. of 1-blocks: \\d\+, 2-blocks: \\d\+, max blk sz: \\d\+, max free sz: \\d\+

tests/run-tests

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,6 @@ def run_tests(pyb, tests, args):
187187
if not 'True' in str(t, 'ascii'):
188188
skip_tests.add('cmdline/repl_emacs_keys.py')
189189

190-
# These tests are now broken because showbc uses buffered printf
191-
if True:
192-
skip_tests.add('cmdline/cmd_verbose.py')
193-
skip_tests.add('cmdline/cmd_showbc.py')
194-
195190
upy_byteorder = run_micropython(pyb, args, 'feature_check/byteorder.py')
196191
has_complex = run_micropython(pyb, args, 'feature_check/complex.py') == b'complex\n'
197192
cpy_byteorder = subprocess.check_output([CPYTHON3, 'feature_check/byteorder.py'])

0 commit comments

Comments
 (0)
0