Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2485 (closed defect: fixed)

Opened 9 years ago

Last modified 8 years ago

New project tests failure

Reported by: bochecha Owned by:
Priority: normal Milestone: 1.1.2
Component: TurboGears Version: 1.1 HEAD
Severity: normal Keywords:
Cc:

Description

A shiny-out-of-the-oven new project fails to pass its auto-generated tests.

$ tg-admin quickstart # create 'dummy' project
$ cd dummy
$ nosetests}}}

The tests fail with the following message:
{{{
(virt-sp) X:\progs\dummy>nosetests
.E...E
======================================================================
ERROR: Login with correct credentials and then logout.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\progs\dummy\dummy\tests\test_controllers.py", line 49, in test_login_and_logout
    email_address = u"scott@enterprise.com")
TypeError: __init__() got an unexpected keyword argument 'display_name'
-------------------- >> begin captured logging << --------------------
turbogears.visit: INFO: Visit Tracking starting (timeout = 1200 sec).
turbogears.identity.savisit: INFO: Succesfully loaded "dummy.model.Visit"
turbogears.visit: INFO: Visit filter initialised
turbogears.identity: INFO: Identity starting
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.User".
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.Group".
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.Permission".
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.VisitIdentity".
turbogears.identity: INFO: Identity visit plugin initialised
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.User".
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.Group".
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.Permission".
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.VisitIdentity".
turbogears.visit: WARNING: Visit manager already running.
turbogears.identity: INFO: Identity starting
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.User".
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.Group".
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.Permission".
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.VisitIdentity".
turbogears.identity: INFO: Identity visit plugin initialised
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.User".
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.Group".
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.Permission".
turbogears.identity.saprovider: INFO: Succesfully loaded "dummy.model.VisitIdentity".
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Object creation should set the name.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\progs\dummy\dummy\tests\test_model.py", line 33, in test_creation
    password = u"Wafer-thin Mint")
TypeError: __init__() got an unexpected keyword argument 'email_address'

----------------------------------------------------------------------
Ran 6 tests in 3.906s

FAILED (errors=2)
}}}

Change History

comment:1 Changed 9 years ago by bochecha

For the record, the issue doesn't happen with TG-1.0.9

comment:2 follow-up: ↓ 3 Changed 9 years ago by bochecha

Now that's weird, it doesn't happen with TG-1.1.1 here either.

I was testing on Windows when I reported the issue and could reproduce it 100%.

Now, I quickstart a TG project woth either TG-1.0.9 or TG-1.1.1 on my Fedora 12 box, and the issue never occurs. It even seems like there are fewer unit tests in a quickstarted project on Linux than what I had on Windows :-/

comment:3 in reply to: ↑ 2 Changed 9 years ago by bochecha

Replying to bochecha:

It even seems like there are fewer unit tests in a quickstarted project on Linux than what I had on Windows :-/

Doh! I forgot to enable the identity when I quickstarted the project...

With identity enabled I get 11 tests, they all run fine on my Fedora 12 box.

---

Now, on my Windows box, I found out why the tests were failing: I was using SQLAlchemy 0.5.6. The tests all pass with SQLA 0.6b3.

Does this mean that TG-1.1.1 depends on SQLA>=0.6?

Currently a quickstarted project requires SQLA>=0.4.3, but it seems wrong if the tests are failing :-/

comment:4 Changed 9 years ago by chrisz

  • Milestone changed from __unclassified__ to 1.1.2

comment:5 Changed 8 years ago by chrisz

  • Status changed from new to closed
  • Resolution set to fixed

The traceback shows code from a project quickstarted before r6632. Should have been fixed with that changeset.

Note: See TracTickets for help on using tickets.