Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#5716 closed (wontfix)

Running the tests on Debian

Reported by: faheem@… Owned by: nobody
Component: Documentation Version: dev
Severity: Keywords: Debian tests runtests.py
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I suggest adding this somewhere in http://www.djangoproject.com/documentation/contributing/. This belongs with the "Running the unit tests" Perhaps have a separate section for distribution specific information? An alternative would be some wiki page, but I'm not sure where.


To run the Django tests on Debian, since Debian does not currently have the tests installed, it is necessary to do the following.

Install some version (I used 0.96+svn6373-1), which is the most recent packaged version available at time writing

apt-get source python-django=0.96+svn6373-1

cd python-django-0.96+svn6373/tests/

python runtests.py --settings=django.conf.project_template.settings

If is simplest to use sqlite3 for the database. In that case, it is necessary to edit /usr/share/python-support/python-django/django/conf/project_template/settings.py
and add DATABASE_ENGINE = 'sqlite3' and also install python-pysqlite2.

Faheem.

Change History (5)

comment:1 by Malcolm Tredinnick, 16 years ago

I would say that if Debian's packaging is going to break the tests, they should patch the documentation to accommodate their own modifications. Our documentation is correct for the way Django is distributed (as a single tarball). If a distribution is going to change that, they need to fix all the pieces, including the docs.

comment:2 by James Bennett, 16 years ago

Resolution: wontfix
Status: newclosed

If Debian's distribution is causing problems, that's a bug in Debian. I'm going to close and kick it upstream.

comment:3 by Raphaël Hertzog <raphael@…>, 16 years ago

Resolution: wontfix
Status: closedreopened

(I'm one of the Debian maintainer of the python-django package, you can keep my name in a contact list in case you have debian related questions/problems in the future)

Debian installs python-django with the standard "python setup.py build && python setup.py install" so it's difficult to argue that we deliberately "break" the tests. If being able to run the tests is an important feature of a live installation of Django, then you should install them at the same time, preferrably in the "django" package (instead of creating a top-level package "tests").

Due to the rational above, I'm reopening it but if you decide to close it again, I won't object. I'm not particularly convinced that the tests are really needed in a typical installation but such a choice is IMO worth documenting.

comment:4 by Russell Keith-Magee, 16 years ago

Resolution: wontfix
Status: reopenedclosed

This isn't a packaging problem. The tests are not an essential part of a Django install for runtime purposes - hence they are not included as part of a python setup.py install.

The original request was to document a use case that shouldn't be encouraged. The Django tests are intended for use when you are working on Django itself - in which case, you should not be working from a Debian package. If you're going to contribute to Django itself, you will need to check out SVN trunk, like the instructions currently say.

comment:5 by James Bennett, 16 years ago

OK, then, I think I misunderstood the original report. My bad.

Note: See TracTickets for help on using tickets.
Back to Top