[pypy-dev] Pypy frontend/ testall.py

logistix vze55z8s at verizon.net
Tue Mar 4 03:58:33 CET 2003



> -----Original Message-----
> From: Rocco Moretti [mailto:roccomoretti at netscape.net]
> Sent: Monday, March 03, 2003 9:17 PM
> To: logi.stix at verizon.net; pypy-dev at codespeak.net
> Subject: RE: [pypy-dev] Pypy frontend/ testall.py
> 
> 
> "logistix" <vze55z8s at verizon.net> wrote:
> 
> 
> That's interesting - Which platform and ObjSpace were you using?
> 
> When I tried this weekend with TrivialObjSpace under Python
> 2.2.2 on Win98 
> the results were encouraging - most of the tests passed (eventually). 


I'm running 2.2.2 on XP.  I've attached the fatal traceback to the end
of this message if you're interested.  There were also some less
catastrophic failures in the various tests.
 
> One MAJOR caveat on that issue is that I had to edit 
> regrtest.py to get it 
> to work. Out of the box all the tests failed miserably with 
> "Module Not 
> Found Errors". regrtest.py assumes that tests are in 
> test_???.py files in 
> the current package level (Lib/test, but the level is 
> implicit). However, 
> when the pypy interpreter runs an import, the import runs 
> local in the 
> Lib/pypy/interpreter package - no test_??? files are found.
> 

I originally had that problem too.  I'm running this script outside of
the whole pythonpath in a directory called pypy that has all of the pypy
source.  You'll see some bad voodoo that manually adds the path back in.
This lets you execute any script anywhere with "C:\pypy\pypython.py
script.py".  I just noticed that this only works when you run
"pypython.py", and not "python pypython.py".  I guess I'll have to hack
in something from argv[0] for the latter case?


TRACEBACK (for what it's worth)
===============================

C:\Python22\Lib\test>c:\pypy\pypython.py testall.py > c:\dummy.txt
C:\Python22\Lib\test\test_b1.py:329: FutureWarning: hex()/oct() of
negative int
will return a signed string in Python 2.4 and up
  if len(hex(-1)) != len(hex(sys.maxint)): raise TestFailed,
'len(hex(-1))'
C:\Python22\Lib\test\test_b1.py:330: FutureWarning: hex()/oct() of
negative int
will return a signed string in Python 2.4 and up
  if hex(-16) not in ('0xfffffff0', '0xfffffffffffffff0'):
C:\Python23\lib\pre.py:94: DeprecationWarning: Please use the 're'
module, not t
he 'pre' module
  DeprecationWarning)
C:\Python23\lib\Cookie.py:687: DeprecationWarning: SerialCookie class is
insecur
e; do not use it
  DeprecationWarning)
C:\Python23\lib\Cookie.py:712: DeprecationWarning: Cookie/SmartCookie
class is i
nsecure; do not use it
  DeprecationWarning)
Traceback (most recent call last):
  File "c:\pypy\pypython.py", line 57, in ?
    x.execFile(sys.argv[1])
  File "c:\pypy\pypython.py", line 46, in execFile
    self.execString(f.read())
  File "c:\pypy\pypython.py", line 42, in execString
    self.ec.eval_frame(frame)
  File
"C:\Python22\Lib\site-packages\pypy\interpreter\executioncontext.py",
lin
e 13, in eval_frame
    result = frame.eval(self)
  File "C:\pypy\interpreter\pyframe.py", line 49, in eval
    opcode.dispatch_arg(self, op, oparg)
  File "C:\pypy\interpreter\opcode.py", line 701, in dispatch_arg
    fn(f, oparg)
  File "C:\pypy\interpreter\opcode.py", line 607, in CALL_FUNCTION
    call_function_extra(f, oparg, False, False)
  File "C:\pypy\interpreter\opcode.py", line 603, in call_function_extra
    w_result = f.space.call(w_function, w_arguments, w_keywords)
  File "C:\Python22\Lib\site-packages\pypy\objspace\trivial.py", line
203, in ca
ll
    return ec.eval_frame(frame)
  File
"C:\Python22\Lib\site-packages\pypy\interpreter\executioncontext.py",
lin
e 13, in eval_frame
    result = frame.eval(self)
  File "C:\pypy\interpreter\pyframe.py", line 49, in eval
    opcode.dispatch_arg(self, op, oparg)
  File "C:\pypy\interpreter\opcode.py", line 701, in dispatch_arg
    fn(f, oparg)
  File "C:\pypy\interpreter\opcode.py", line 607, in CALL_FUNCTION
    call_function_extra(f, oparg, False, False)
  File "C:\pypy\interpreter\opcode.py", line 603, in call_function_extra
    w_result = f.space.call(w_function, w_arguments, w_keywords)
  File "C:\Python22\Lib\site-packages\pypy\objspace\trivial.py", line
203, in ca
ll
    return ec.eval_frame(frame)
  File
"C:\Python22\Lib\site-packages\pypy\interpreter\executioncontext.py",
lin
e 13, in eval_frame
    result = frame.eval(self)
  File "C:\pypy\interpreter\pyframe.py", line 49, in eval
    opcode.dispatch_arg(self, op, oparg)
  File "C:\pypy\interpreter\opcode.py", line 701, in dispatch_arg
    fn(f, oparg)
  File "C:\pypy\interpreter\opcode.py", line 607, in CALL_FUNCTION
    call_function_extra(f, oparg, False, False)
  File "C:\pypy\interpreter\opcode.py", line 603, in call_function_extra
    w_result = f.space.call(w_function, w_arguments, w_keywords)
  File "C:\Python22\Lib\site-packages\pypy\objspace\trivial.py", line
203, in ca
ll
    return ec.eval_frame(frame)
  File
"C:\Python22\Lib\site-packages\pypy\interpreter\executioncontext.py",
lin
e 13, in eval_frame
    result = frame.eval(self)
  File "C:\pypy\interpreter\pyframe.py", line 49, in eval
    opcode.dispatch_arg(self, op, oparg)
  File "C:\pypy\interpreter\opcode.py", line 701, in dispatch_arg
    fn(f, oparg)
  File "C:\pypy\interpreter\opcode.py", line 607, in CALL_FUNCTION
    call_function_extra(f, oparg, False, False)
  File "C:\pypy\interpreter\opcode.py", line 603, in call_function_extra
    w_result = f.space.call(w_function, w_arguments, w_keywords)
  File "C:\Python22\Lib\site-packages\pypy\objspace\trivial.py", line
203, in ca
ll
    return ec.eval_frame(frame)
  File
"C:\Python22\Lib\site-packages\pypy\interpreter\executioncontext.py",
lin
e 13, in eval_frame
    result = frame.eval(self)
  File "C:\pypy\interpreter\pyframe.py", line 49, in eval
    opcode.dispatch_arg(self, op, oparg)
  File "C:\pypy\interpreter\opcode.py", line 701, in dispatch_arg
    fn(f, oparg)
  File "C:\pypy\interpreter\opcode.py", line 607, in CALL_FUNCTION
    call_function_extra(f, oparg, False, False)
  File "C:\pypy\interpreter\opcode.py", line 603, in call_function_extra
    w_result = f.space.call(w_function, w_arguments, w_keywords)
  File "C:\Python22\Lib\site-packages\pypy\objspace\trivial.py", line
206, in ca
ll
    return apply(callable, args, kwds)
  File "c:\python23\lib\profile.py", line 214, in trace_dispatch_i
    if self.dispatch[event](self, frame,t):
  File "c:\python23\lib\profile.py", line 280, in trace_dispatch_return
    assert frame is self.cur[-2].f_back, ("Bad return", self.cur[-3])
AssertionError: ('Bad return', ('profile', 0, 'testfunc()'))

C:\Python22\Lib\test>



More information about the Pypy-dev mailing list