I'm also now getting a second error (when I change line 60):
Traceback (most recent call last):
File "/home/ian/web/web2py/gluon/shell.py", line 206, in run
execfile(startfile, _env)
File "testRunner.py", line 110, in <module>
g=custom_execfile(f)
File "testRunner.py", line 75, in custom_execfile
except (WindowsError,ValueError,SystemExit):
NameError: global name 'WindowsError' is not defined
This puzzles me, since I would have assumed that python Error types are
standard. I'm running this on Linux (Ubuntu 12.04) with unittest installed
via repository.
Ian
On Thursday, April 5, 2012 6:53:36 PM UTC-4, monotasker wrote:
>
> I'm trying to set up unit testing using testRunner.py as laid out here:
> http://www.web2pyslices.com/slice/show/1465/unittesting-doctesting-and-userinterface-testing
>
> . When I run the tests I'm getting this error:
>
> AttributeError: 'thread._local' object has no attribute 'app'
>
> This is fixed if I change line 60 of testRunner.py from this:
>
> current.app.db=db
>
> to this:
>
> current.db=db
>
> But I'm not sure either why it throws the error in the first place or why
> this change fixes it. There's a 2-month old comment on the slice page
> asking about this but the author hasn't replied. I'm wondering whether this
> should be changed in testRunner? Or is there some app configuration that is
> skipped in the instructions?
>
> Ian
>