FAQ
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...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110520/3a125473/attachment-0001.html>

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMay 20, '11 at 6:31a
activeMay 20, '11 at 6:31a
posts1
users1
websitepython.org

1 user in discussion

SONAL ...: 1 post

People

Translate

site design / logo © 2022 Grokbase