[py-dev] pytest -r does not work ... even with pypy present

Harald Armin Massa haraldarminmassa at gmail.com
Tue Jul 22 17:45:47 CEST 2008


trying to use pytest with -r to run a browser and keep looking on my tests.

Without pypy installed: it fails with an exception of "skip "pypy not found")

with pypy checked out and put into pythonpath:

C:\ham\ibox25>pytest -r parsvalue.py
Server started, listening on port 1432


import py.__.test.rsession.webjs
from pypy.translator.js.helper import __show_traceback
from pypy.rlib.nonconst import NonConstant as NonConst


def some_strange_function_which_will_never_be_called():

    py.__.test.rsession.webjs.main()
    py.__.test.rsession.webjs.show_skip(NonConstant('aa'))
    py.__.test.rsession.webjs.show_traceback(NonConstant('aa'))
    py.__.test.rsession.webjs.show_info(NonConstant('aa'))
    py.__.test.rsession.webjs.hide_info()
    py.__.test.rsession.webjs.show_host(NonConstant('aa'))
    py.__.test.rsession.webjs.hide_host()
    py.__.test.rsession.webjs.hide_messagebox()
    py.__.test.rsession.webjs.opt_scroll()

[translation:info] Annotating&simplifying...
[translation:info] with policy: pypy.translator.js.main.JsPolicy

[translation:ERROR] Error:
[translation:ERROR]  UnboundLocalError: local variable 'c' referenced before ass
ignment
[translation] start debugger...
Traceback (most recent call last):
  File "C:\Python25\lib\SocketServer.py", line 222, in handle_request
    self.process_request(request, client_address)
  File "C:\Python25\lib\SocketServer.py", line 241, in process_request
    self.finish_request(request, client_address)
  File "C:\Python25\lib\SocketServer.py", line 254, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python25\lib\SocketServer.py", line 522, in __init__
    self.handle()
  File "C:\Python25\lib\BaseHTTPServer.py", line 316, in handle
    self.handle_one_request()
  File "C:\Python25\lib\BaseHTTPServer.py", line 310, in handle_one_request
    method()
  File "c:\libraries\pypy-dist\py\test\rsession\web.py", line 371, in do_GET
    method_to_call()
  File "c:\libraries\pypy-dist\py\test\rsession\web.py", line 408, in run_jssour
ce
    open(str(js_name), "w").write(javascript_source)
TypeError: argument 1 must be string or read-only character buffer, not None







-- 
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
no fx, no carrier pidgeon
-
EuroPython 2008 will take place in Vilnius, Lithuania - Stay tuned!



More information about the Pytest-dev mailing list