[EMAIL PROTECTED] schrieb:
> I like test driven development, so now that I'm ready to start
> serious development the first thing I did was run the nosetests.

What do you you ran the tests? On TurboGears itself or one of your projects?

> They failed.  I tried it again in a fresh quickstart project,
> and they still failed.

Yes, but only one of them should fail.

> This is tg 1.0.1 with Identity enabled, and the identity tests appear
> to be the problem. 

'tests.test_controllers.test_logintitle' to be precise.

> There's also the capitalization issue with the
> tags that I heard mentioned here earlier. 

That can be fixed by setting 'kid.outputformat="HTML"' (capital HTML) in
'myproject/config/app.cfg'.

> I also remember some
> stuff about tests failing with DB errors, but I believe that had
> to do with SQL Alchemy, and I'm using SO.

No, it is effecting SQLObject also, because the identity initialization was a
bit messy when running tests. AFAIK that should be fixed in the 1.0 branch now.

> I'm surprised that a release went out the door with tests that fail
> out of the box.

Yes, we should probably have a pre-release testing script that checks several
quickstarted projects with different settings. I'll bring that up on the trunk
mailing list.

But you have to distinguish between tests for TurboGears itself and the tests
of a quickstarted project.

> If these bugs have been fixed, what's the best way to track the
> "production" version of TG (I presume that's 1.0.1 right now,
> since that's what comes up when I do an easy_install of TG)
> with bug fixes applied?

If you download a current tgsetup,py you should always get the latest
production release. You can also run an SVN checkout from 'branches/1.0', if
you want to benefit from latest fixes (but also suffer from possible breakages).

> I did not get any hits when I searched on the particular error
> message I'm getting from the nosetests.  They look like this:
> OperationalError: table tg_user already exists

Hmm, this error might indicate that you aren't running the tests with a fresh
database. Have you changed 'test.cfg'? Can you checkout the latest version from
 the branch and try if you still get the *same* error?

But, anyway, the problem with the identity tests still don't seem to be fixed.
When I run 'python setup.py test' in a quickstarted project with SQLObject and
identity and a fresh TurboGears 1.0.1 installation, I get the following error:

File "/home/chris/tmp/tgenv/src/MyTest2/mytest2/tests/test_controllers.py",
line 32, in test_logintitle
assert "<TITLE>Login</TITLE>" in cherrypy.response.body[0]
AssertionError

The same happens if I check out the latest 1.0 branch version, do a 'python
setup.py develop', create a quickstarted app and run the tests:

File "/home/chris/tmp/tgenv/src/MyTest4/mytest4/tests/test_controllers.py",
line 34, in test_logintitle
    assert "<title>login</title>" in response
AssertionError

To see the real error, I run 'nosetests -d -w mytest4' and get:

file
"/home/chris/tmp/tgenv/lib/python2.4/cherrypy-2.2.1-py2.4.egg/cherrypy/filters/__init__.py",
line 151, in applyfilters
    method()
  file "/home/chris/tmp/tgenv/src/turbogears/turbogears/visit/api.py", line
147, in before_main
    visit= _manager.new_visit_with_key( visit_key )
attributeerror: 'nonetype' object has no attribute 'new_visit_with_key'

The error is the same for projects with SQLObject or with SQLAlchemy. It seems
that changeset 2366 only fixed the tests of TurboGears itself and not the tests
in the quickstart templates.

Chris

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

Reply via email to