Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#11024 closed (duplicate)

Django runtests.py should work without configuring DJANGO_SETTINGS_MODULE

Reported by: ericholscher Owned by: ericholscher
Component: Testing framework Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Allowing people to simply cd into django/tests and execute runtests.py and have it work out of the box makes a lot of sense. It will allow tests to be run easier.

Attachments (0)

Change History (4)

comment:1 Changed 5 years ago by ericholscher

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Note that I mean that database options should be able to be defined on the command line, or default to Sqlite. Brian Rosner wrote some code for normal Django apps that accomplishes this: http://github.com/ericholscher/django-test-utils/blob/9b2b869940451ceb67166bc4ebb88a112b5dda87/test_utils/bin/django_test_runner.py

Something along those lines would make it really easy to get up and running, and people who wanted to test against another DB could define it on the command line, or add a settings file.

comment:2 Changed 5 years ago by Alex

Defaulting to SQLite only really makes sense once we require 2.5, since that's the first version where we can assume SQLite.

comment:3 Changed 5 years ago by dc

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

Duplicate of #6298

comment:4 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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.