Code

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#17250 closed Bug (worksforme)

Running unit test based on example tests.py not working

Reported by: social@… Owned by: nobody
Component: Testing framework Version: 1.3
Severity: Normal Keywords: Test
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hello,

I'm pretty new to Django and exploring all the features it provides. Whenever I try to run the example tests.py file distributed with any new app created (e.g. python manage.py startapp polls, s. tutorial for Django 1.3), the process never ends and Python has a CPU load of 99%.

Database connectivity (based on MySQL) is working as I have run python manage.py syncdb successfully.

Here's the output when running the unit test:

tte@arbre:/www/sites/mysite$ python manage.py test
Creating test database for alias 'default'...
.......................................................................................

Although the test database is created and the database user should have all the right permissions, the process never completes.

I'm using Python 2.7 (built with MacPorts).

Is there anything I'm missing?

Tobi

Attachments (0)

Change History (2)

comment:1 Changed 2 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to worksforme
  • Status changed from new to closed

Hi Tobi,

I'm going to mark this ticket as worksforme for the moment. I can't reproduce this problem, and I haven't seen anything like it in many years of running Django test suites.

If you want help diagnosing this problem, please ask on the django-users mailing list. Trac isn't a help or support forum -- it's a way for us to track known problems with Django and make sure they get fixed. If the discussion on django-users reveals that something is actually wrong with Django (or that we need to document some special condtion), we can reopen this ticket to track the actual problem.

comment:2 Changed 2 years ago by anonymous

Hi russellm,

after further testing I found out that tests actually work using OSX Lion's built-in Python and sqlite3; seems I'll have to take a closer look at my MacPorts toolchain. Thanks for your advise regarding Trac - will consider it next time.

Tobi

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.