[issue23] test_generators fails
New submission from Rocco Moretti <roccomoretti@netscape.net>: Under TrivialObjSpace in revision 367, test_generators from the CPython regression tests fails with the following results (-v option, edited): test_generators <...> Running string test_generators.__test__.conjoin Expecting: [0, 0, 0] [0, 0, 1] [0, 1, 0] [0, 1, 1] [1, 0, 0] [1, 0, 1] [1, 1, 0] [1, 1, 1] ***************************************************************** Failure in example: for c in conjoin([lambda: iter((0, 1))] * 3): print c from line #5 of test_generators.__test__.conjoin Exception raised: Traceback (most recent call last): File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 59, in eval raise SApplicationException(e) SApplicationException: [exceptions.AttributeError: 'dict' object has no attribute 'cell'] Expecting: nothing ok Expecting: 0 1 1 1 1 2 1 1 2 4 1 1 3 8 1 1 4 16 1 1 5 32 1 1 6 64 1 1 7 128 1 1 8 256 1 1 9 512 1 1 ***************************************************************** Failure in example: for n in range(10): all = list(gencopy(conjoin([lambda: iter((0, 1))] * n))) print n, len(all), all[0] == [0] * n, all[-1] == [1] * n from line #24 of test_generators.__test__.conjoin Exception raised: Traceback (most recent call last): File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 59, in eval raise SApplicationException(e) SApplicationException: [exceptions.AttributeError: 'dict' object has no attribute 'cell'] Expecting: nothing ***************************************************************** Failure in example: q = Queens(8) from line #40 of test_generators.__test__.conjoin Exception raised: Traceback (most recent call last): File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 59, in eval raise SApplicationException(e) SApplicationException: [exceptions.AttributeError: 'dict' object has no attribute 'cell'] Expecting: nothing ok <...> Solution 2 +-+-+-+-+-+-+-+-+ |Q| | | | | | | | +-+-+-+-+-+-+-+-+ | | | | | |Q| | | +-+-+-+-+-+-+-+-+ | | | | | | | |Q| +-+-+-+-+-+-+-+-+ | | |Q| | | | | | +-+-+-+-+-+-+-+-+ | | | | | | |Q| | +-+-+-+-+-+-+-+-+ | | | |Q| | | | | +-+-+-+-+-+-+-+-+ | |Q| | | | | | | +-+-+-+-+-+-+-+-+ | | | | |Q| | | | +-+-+-+-+-+-+-+-+ ***************************************************************** Failure in example: for row2col in q.solve(): count += 1 if count <= LIMIT: print "Solution", count q.printsolution(row2col) from line #43 of test_generators.__test__.conjoin Exception raised: Traceback (most recent call last): File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 59, in eval raise SApplicationException(e) SApplicationException: [exceptions.NameError: name 'q' is not defined] Expecting: 92 solutions in all. ***************************************************************** Failure in example: print count, "solutions in all." from line #85 of test_generators.__test__.conjoin Got: 0 solutions in all. Expecting: nothing ***************************************************************** Failure in example: k = Knights(10, 10) from line #91 of test_generators.__test__.conjoin Exception raised: Traceback (most recent call last): File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 59, in eval raise SApplicationException(e) SApplicationException: [exceptions.AttributeError: 'dict' object has no attribute 'cell'] Expecting: nothing ok <...> Solution 2 +---+---+---+---+---+---+---+---+---+---+ | 1| 58| 27| 34| 3| 40| 29| 10| 5| 8| +---+---+---+---+---+---+---+---+---+---+ | 26| 35| 2| 57| 28| 33| 4| 7| 30| 11| +---+---+---+---+---+---+---+---+---+---+ | 59|100| 73| 36| 41| 56| 39| 32| 9| 6| +---+---+---+---+---+---+---+---+---+---+ | 74| 25| 60| 55| 72| 37| 42| 49| 12| 31| +---+---+---+---+---+---+---+---+---+---+ | 61| 86| 99| 76| 63| 52| 47| 38| 43| 50| +---+---+---+---+---+---+---+---+---+---+ | 24| 75| 62| 85| 54| 71| 64| 51| 48| 13| +---+---+---+---+---+---+---+---+---+---+ | 87| 98| 89| 80| 77| 84| 53| 46| 65| 44| +---+---+---+---+---+---+---+---+---+---+ | 90| 23| 92| 95| 70| 79| 68| 83| 14| 17| +---+---+---+---+---+---+---+---+---+---+ | 97| 88| 21| 78| 81| 94| 19| 16| 45| 66| +---+---+---+---+---+---+---+---+---+---+ | 22| 91| 96| 93| 20| 69| 82| 67| 18| 15| +---+---+---+---+---+---+---+---+---+---+ ***************************************************************** Failure in example: for x in k.solve(): count += 1 if count <= LIMIT: print "Solution", count k.printsolution(x) else: break from line #94 of test_generators.__test__.conjoin Exception raised: Traceback (most recent call last): File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 59, in eval raise SApplicationException(e) SApplicationException: [exceptions.NameError: name 'k' is not defined] 7 of 12 examples failed in string test_generators.__test__.conjoin Running string test_generators.__test__.email Expecting: nothing ok Expecting: [None, None, None, None] ***************************************************************** Failure in example: list(g()) from line #9 of test_generators.__test__.email Exception raised: Traceback (most recent call last): File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 59, in eval raise SApplicationException(e) SApplicationException: [exceptions.TypeError: iteration over non-sequence] Expecting: nothing ok Expecting: [1, 2, 3] ***************************************************************** Failure in example: list(g()) from line #22 of test_generators.__test__.email Exception raised: Traceback (most recent call last): File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 59, in eval raise SApplicationException(e) SApplicationException: [exceptions.TypeError: iteration over non-sequence] Expecting: nothing ok <...> 5-combs of [1, 2, 3, 4]: Traceback (most recent call last): File "C:\pypy\PyPyTest.py", line 213, in run_console_file con.ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 51, in eval opcode.dispatch_noarg(self, op) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 698, in dispatch_noarg fn(f) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 294, in EXEC_STMT ec.eval_frame(newframe) #discard return value File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 49, in eval opcode.dispatch_arg(self, op, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 707, in dispatch_arg fn(f, oparg) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 613, in CALL_FUNCTION call_function_extra(f, oparg, False, False) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 609, in call_function_extra w_result = f.space.call(w_function, w_arguments, w_keywords) File "C:\PYTHON22\lib\pypy\objspace\trivial.py", line 203, in call return ec.eval_frame(frame) File "C:\PYTHON22\lib\pypy\interpreter\executioncontext.py", line 13, in eval_frame result = frame.eval(self) File "C:\PYTHON22\lib\pypy\interpreter\pyframe.py", line 51, in eval opcode.dispatch_noarg(self, op) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 698, in dispatch_noarg fn(f) File "C:\PYTHON22\lib\pypy\interpreter\opcode.py", line 557, in GET_ITER w_iterator = f.space.iter(w_iterable) TypeError: iteration over non-sequence ---------- messages: 42 nosy: rocco priority: bug status: unread title: test_generators fails __________________________________________________ PyPython issue tracker <pypy-issues@codespeak.net> http://codespeak.net/issues/pypy/issue23 __________________________________________________
participants (1)
-
Rocco Moretti