Closed anton-trunov closed 3 years ago
Looks like more output confusion due to mixing plain text from QuickChick with control messages from SerAPI:
File "alectryon/core.py", line 139, in next_sexp
sexp = sx.load(response)
response = b' n + n + n + n + n + n + n + n + n + n + n + n + n)\n'
self = <alectryon.core.SerAPI object at 0x7f9354c2da90>
File "alectryon/sexp.py", line 77, in load
return parse(tokenize(bs))
bs = b' n + n + n + n + n + n + n + n + n + n + n + n + n)\n'
File "alectryon/sexp.py", line 71, in parse
top = stack.pop()
stack = []
tok = 41
tokens = <generator object tokenize at 0x7f9354bb6510>
top = [b'n', b'+', b'n', b'+', b'n', b'+', b'n', b'+', b'n', b'+', b'n', b'+', b'n', b'+', b'n', b'+', b'n', b'+', b'n', b'+', b'n', b'+', b'n', b'+', b'n']
IndexError: pop from empty list
IOW, the problem is that Alectryon attempts to part that last line as a SEXP and fails due to the mismatched parenthesis. I've pushed a patch to ignore all lines that fail to parse in --expect-unexpected.
Is it possible to make a new release with the bug fix for this issue?
Done, 1.2 should be live soon.
Awesome! Thanks.
Here is an example that demonstrates the issue.
Running
produces
IndexError: pop from empty list
.I noticed that QuickChick pretty-prints the property above as follows:
Here is the traceback: