I have directory structure as gnukhata/tests/functional. In functional folder I have web tests files. Following is the sample tests:
*from gnukhata.tests import * class TestVendorController(TestController): def test_index(self): response = self.app.get(url(controller='vendor', action='index'**))* After running tests, it gives me following error: *Traceback (most recent call last): File "/usr/lib/python2.6/dist-packages/twisted/trial/runner.py", line 651, in loadByNames things.append(self.findByName(name)) File "/usr/lib/python2.6/dist-packages/twisted/trial/runner.py", line 460, in findByName return filenameToModule(name) File "/usr/lib/python2.6/dist-packages/twisted/trial/runner.py", line 98, in filenameToModule return _importFromFile(fn) File "/usr/lib/python2.6/dist-packages/twisted/trial/runner.py", line 117, in _importFromFile module = imp.load_source(moduleName, fn, fd) File "test_vendor.py", line 1, in <module> from gnukhata.tests import * exceptions.ImportError: No module named tests* Instead of gnukhata.tests if I write gnukhata then it shows the following error: *Traceback (most recent call last): File "/usr/lib/python2.6/dist-packages/twisted/trial/runner.py", line 651, in loadByNames things.append(self.findByName(name)) File "/usr/lib/python2.6/dist-packages/twisted/trial/runner.py", line 460, in findByName return filenameToModule(name) File "/usr/lib/python2.6/dist-packages/twisted/trial/runner.py", line 98, in filenameToModule return _importFromFile(fn) File "/usr/lib/python2.6/dist-packages/twisted/trial/runner.py", line 117, in _importFromFile module = imp.load_source(moduleName, fn, fd) File "test_vendor.py", line 3, in <module> class TestVendorController(TestController): exceptions.NameError: name 'TestController' is not defined * How to remove these errors??? Suggest me solution... Thanks in advance...
-- http://mail.python.org/mailman/listinfo/python-list