I have a module applications/webapp/modules/a.py that contains a local_import to import applications/webapp/modules/b.py. I want to doctest a.py and b.py. The web2py shell with "-T" option partially works but complains with the exception pasted below after saying "Finding tests in a.py: class".
I understand that this is because the "-T" option is meant only for testing controllers. But due to local_import within a.py there is no easy way to doctest a.py outside of the web2py environment. So how should I go about refactoring the modules so that I can doctest them?
Traceback (most recent call last):
File "web2py.py", line 19, in gluon.widget.start(cron=True) File "/home/.../web2py/gluon/widget.py", line 796, in start test(options.test, verbose=options.verbose) File "/home/.../web2py/gluon/shell.py", line 326, in test doctest_object(name, obj) File "/home/.../web2py/gluon/shell.py", line 322, in doctest_object doctest_object(attr_name, o) File "/home/.../web2py/gluon/shell.py", line 321, in doctest_object o = eval('%s.%s' % (name, attr_name), globs) File "", line 1, in NameError: name 'class' is not defined