On Nov 17, 2006, at 11:34 AM, Diez B. Roggisch wrote:
> > Hi, > > Ok, forgive the stupid pun... however, I ran into a small problem > with > nosetests: when I started writing controllers that imported my > model, it > would puke on me with :) hope you're only taking coffee for those long hacking hours... ;) > > ====================================================================== > ERROR: test module varms.controllers > in /home/droggisch/projects/artnology/Van_Abbe_RMS/Van-Abbe-RMS > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/lib/python2.4/site-packages/nose-0.9.1-py2.4.egg/nose/ > suite.py", > line 46, in run > self.setUp() > File "/usr/lib/python2.4/site-packages/nose-0.9.1-py2.4.egg/nose/ > suite.py", > line 192, in setUp > self.module = _import(self.moduleName, [self.path], self.conf) > > File "/usr/lib/python2.4/site-packages/nose-0.9.1-py2.4.egg/nose/ > importer.py", > line 97, in _import > mod = load_module(fqname, fh, filename, desc) > > File "/home/droggisch/projects/artnology/Van_Abbe_RMS/Van-Abbe-RMS/ > varms/controllers/__init__.py", > line 10, in ? > from varms import json > > File "/home/droggisch/projects/artnology/Van_Abbe_RMS/Van-Abbe-RMS/ > varms/json.py", > line 15, in ? > from varms.model import User, Group, Permission > > File "/home/droggisch/projects/artnology/Van_Abbe_RMS/Van-Abbe-RMS/ > varms/model.py", > line 125, in ? > class GuideBookable(Bookable): > > File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1-py2.4.egg/ > sqlobject/declarative.py", > line 109, in __new__ > cls.__classinit__(cls, new_attrs) > > File "/usr/lib/python2.4/site-packages/SQLObject-0.7.1-py2.4.egg/ > sqlobject/main.py", > line 751, in __classinit__ > if not connection and not getattr(cls, '_connection', None): > > File "/usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/ > turbogears/database.py", > line 172, in __get__ > self.set_hub() > > File "/usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/ > turbogears/database.py", > line 190, in set_hub > raise KeyError, "No database configuration found!" > KeyError: 'No database configuration found!' > > > > As you maybe can see, it tries to import (and then test I presume) my > controllers package, and this fails. > > I admit that I'm not too happy with me putting code in > > package/__init__.py > > and maybe I should refrain from that. Yet I wonder if there is > anything I can > do about this? > > I can go the > > nosetests -sw varms/tests Maybe the patch at http://trac.turbogears.org/turbogears/ticket/1177 helps... could you give it a try and report back? Thanks, Alberto --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

