I've run into an issue with the latest version of Nose.  To demonstrate the issue, I created a new quickstarted project and ran nose on the default tests (Note: I removed the Identity tests in the test_model.py file, so only the controller is being tested).  Here are the results:

-------------------------------------------------------------------------------------------------------------------------------------------------
C:\Documents and Settings\Sean\Desktop\demo>nosetests
E26/Feb/2006:11:46:24 CONFIG INFO Server parameters:
26/Feb/2006:11:46:24 CONFIG INFO   server.environment: development
26/Feb/2006:11:46:24 CONFIG INFO   server.log_to_screen: True
26/Feb/2006:11:46:24 CONFIG INFO   server.log_file:
26/Feb/2006:11:46:24 CONFIG INFO   server.log_tracebacks: True
26/Feb/2006:11:46:24 CONFIG INFO   server.log_request_headers: True
26/Feb/2006:11:46:24 CONFIG INFO   server.protocol_version: HTTP/1.0
26/Feb/2006:11:46:24 CONFIG INFO   server.socket_host:
26/Feb/2006:11:46:24 CONFIG INFO   server.socket_port: 8080
26/Feb/2006:11:46:24 CONFIG INFO   server.socket_file:
26/Feb/2006:11:46:24 CONFIG INFO   server.reverse_dns: False
26/Feb/2006:11:46:24 CONFIG INFO   server.socket_queue_size: 5
26/Feb/2006:11:46:24 CONFIG INFO   server.thread_pool: 0
.2006-02-26 11:46:24,405 turbogears.view DEBUG Loading base templates
2006-02-26 11:46:24,483 turbokid.kidsupport DEBUG Recompiling template for turbo
gears.fastdata.templates.sitetemplate
2006-02-26 11:46:24,483 turbokid.kidsupport DEBUG Recompiling template for demo.
templates.welcome
2006-02-26 11:46:24,483 turbokid.kidsupport DEBUG Applying template demo.templat
es.welcome
.
======================================================================
ERROR: test module demo.config in C:\Documents and Settings\Sean\Desktop\demo
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python24\lib\site-packages\nose-0.8.7-py2.4.egg\nose\core.py", line 4
23, in run
    self.setUp()
  File "c:\python24\lib\site-packages\nose-0.8.7-py2.4.egg\nose\core.py ", line 6
51, in setUp
    self.module = self.loader._import(self.module_name , self.path)
  File "c:\python24\lib\site-packages\nose-0.8.7-py2.4.egg\nose\core.py", line 2
80, in _import
    return nose.importer._import(name, [path])
  File "c:\python24\lib\site-packages\nose- 0.8.7-py2.4.egg\nose\importer.py", li
ne 65, in _import
    mod = load_module(fqname, fh, filename, desc)
  File "C:\Documents and Settings\Sean\Desktop\demo\demo\config.py", line 107, i
n ?
    path("/static")
NameError: name 'path' is not defined


----------------------------------------------------------------------
Ran 2 tests in 1.484s

FAILED (errors=1)
------------------------------------------------------------------------------------------------------------------------------------------------

I then reverted back to a previous version of nose that I had on another machine (v. 0.8.4), and ran the same tests:

------------------------------------------------------------------------------------------------------------------------------------------------
C:\Documents and Settings\Sean\Desktop\demo>nosetests
..
----------------------------------------------------------------------
Ran 2 tests in 1.875s

OK
------------------------------------------------------------------------------------------------------------------------------------------------

So, something has definitely changed.  Anyone have any ideas?  I don't mind using an older version, but this new, non-working version is the default version installed with new TG installations.  Also, this issue causes very odd SQLObject errors like the following:

ValueError: class ScmReceivedFile is already in the registry (other class is <cl
ass 'chartdemo.model.ScmReceivedFile '>, from the module chartdemo.model in C:\Do
cuments and Settings\Sean\Desktop\chartdemo\chartdemo\model.pyc; attempted new c
lass is <class 'chartdemo.model.ScmReceivedFile'>, from the module chartdemo.mod
el in C:\Documents and Settings\Sean\Desktop\chartdemo\chartdemo\model.pyc)

From what I've read, this is caused because of path issues.  I checked my system path while running the 'nosetests' command and found that my project directory appears 3 different times (normally it appears only once).  So, there appears to be path issues as well.

Thanks,

Sean

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to