#11942: testing from a checkout is overly complicated
-------------------------------+--------------------------------------------
Reporter: termie | Owner: nobody
Status: new | Milestone:
Component: Testing framework | Version: SVN
Keywords: | Stage: Unreviewed
Has_patch: 0 |
-------------------------------+--------------------------------------------
I expect this is a rather common progression for anybody who finds some
random line of code they'd like to patch and want to run tests.
Some steps towards this are in ticket 6298
{{{
ter...@termie:~/p/django % svn info
15:48:00
Path: .
URL: http://code.djangoproject.com/svn/django/trunk
Repository Root: http://code.djangoproject.com/svn
Repository UUID: bcc190cf-cafb-0310-a4f2-bffc1f526a37
Revision: 11434
Node Kind: directory
Schedule: normal
Last Changed Author: kmtracey
Last Changed Rev: 11423
Last Changed Date: 2009-08-09 08:44:09 -0700 (Sun, 09 Aug 2009)
ter...@termie:~/p/django % svn up
15:48:03
U django/db/models/sql/expressions.py
U django/db/backends/oracle/base.py
U django/db/backends/oracle/introspection.py
U django/db/backends/__init__.py
U django/conf/locale/he/LC_MESSAGES/django.po
U django/conf/locale/he/LC_MESSAGES/django.mo
U django/forms/fields.py
U django/forms/forms.py
U django/forms/widgets.py
U django/core/handlers/modpython.py
U django/core/management/base.py
U django/core/management/commands/inspectdb.py
U django/core/management/__init__.py
U django/core/urlresolvers.py
U django/views/decorators/cache.py
U django/utils/datastructures.py
U django/utils/decorators.py
U django/contrib/gis/shortcuts.py
U django/contrib/gis/db/models/sql/aggregates.py
U django/contrib/gis/tests/geoapp/test_regress.py
U django/contrib/gis/management/commands/inspectdb.py
U django/contrib/admin/options.py
U django/contrib/admin/templatetags/admin_list.py
U django/contrib/admin/widgets.py
U django/contrib/admin/sites.py
U django/contrib/admin/templates/admin/edit_inline/tabular.html
U
django/contrib/admin/templates/admin/delete_selected_confirmation.html
U django/contrib/auth/tests/__init__.py
U django/contrib/auth/decorators.py
U django/contrib/localflavor/fr/forms.py
U tests/modeltests/expressions/models.py
U tests/regressiontests/admin_views/fixtures/admin-views-person.xml
U tests/regressiontests/admin_views/tests.py
U tests/regressiontests/decorators/tests.py
U tests/regressiontests/forms/error_messages.py
U tests/regressiontests/templates/filters.py
U tests/regressiontests/introspection/tests.py
U tests/regressiontests/backends/tests.py
U tests/regressiontests/queries/models.py
U AUTHORS
U extras/django_bash_completion
U docs/index.txt
U docs/intro/tutorial01.txt
A docs/internals/svn.txt
U docs/internals/index.txt
U docs/howto/deployment/modpython.txt
U docs/howto/deployment/modwsgi.txt
U docs/howto/static-files.txt
U docs/topics/http/sessions.txt
U docs/topics/http/shortcuts.txt
U docs/topics/auth.txt
U docs/topics/generic-views.txt
U docs/topics/db/queries.txt
U docs/topics/forms/modelforms.txt
U docs/releases/1.1.txt
U docs/ref/contrib/formtools/form-wizard.txt
U docs/ref/contrib/comments/index.txt
U docs/ref/contrib/admin/index.txt
U docs/ref/request-response.txt
U docs/ref/models/querysets.txt
U docs/ref/models/fields.txt
U docs/ref/databases.txt
U docs/ref/forms/widgets.txt
U docs/ref/signals.txt
Updated to revision 11593.
ter...@termie:~/p/django % ls
15:48:11
AUTHORS INSTALL LICENSE MANIFEST.in README django docs examples
extras scripts setup.cfg setup.py tests
ter...@termie:~/p/django % cd tests
15:48:12
ter...@termie:p/django/tests % ls
15:48:14
modeltests regressiontests runtests.py templates urls.py
ter...@termie:p/django/tests % python runtests.py
15:48:14
Usage: runtests.py [options] [model model model ...]
runtests.py: error: DJANGO_SETTINGS_MODULE is not set in the environment.
Set it or use --settings.
ter...@termie:p/django/tests % vim settings.py
15:48:18
ter...@termie:p/django/tests % python runtests.py
15:48:30
Usage: runtests.py [options] [model model model ...]
runtests.py: error: DJANGO_SETTINGS_MODULE is not set in the environment.
Set it or use --settings.
ter...@termie:p/django/tests % python runtests.py --settings settings
15:48:31
Traceback (most recent call last):
File "runtests.py", line 191, in <module>
django_tests(int(options.verbosity), options.interactive, args)
File "runtests.py", line 121, in django_tests
from django.db.models.loading import get_apps, load_app
File "/home/termie/lib/python/django/db/__init__.py", line 34, in
<module>
(settings.DATABASE_ENGINE, ", ".join(map(repr, available_backends)),
e_user)
django.core.exceptions.ImproperlyConfigured: 'sqlite' isn't an available
database backend. Available options are: 'dummy', 'mysql', 'oracle',
'postgresql', 'postgresql_psycopg2', 'sqlite3'
Error was: No module named sqlite.base
ter...@termie:p/django/tests % vim settings.py
15:49:03
ter...@termie:p/django/tests % python runtests.py --settings settings
15:49:11
Error while importing proxy_models: File "runtests.py", line 134, in
django_tests
mod = load_app(model_label)
File "/home/termie/lib/python/django/db/models/loading.py", line 72, in
load_app
mod = __import__(app_name, {}, {}, ['models'])
File
"/usr/local/google/home/p/django/tests/modeltests/proxy_models/models.py",
line 42, in <module>
class MyPerson(Person):
File "/home/termie/lib/python/django/db/models/base.py", line 55, in
__new__
new_class.add_to_class('_meta', Options(meta, **kwargs))
File "/home/termie/lib/python/django/db/models/base.py", line 165, in
add_to_class
value.contribute_to_class(cls, name)
File "/home/termie/lib/python/django/db/models/options.py", line 92, in
contribute_to_class
raise TypeError, "'class Meta' got invalid attribute(s): %s" %
','.join(meta_attrs.keys())
TypeError: 'class Meta' got invalid attribute(s): proxy
Error while importing defer: File "runtests.py", line 134, in
django_tests
mod = load_app(model_label)
File "/home/termie/lib/python/django/db/models/loading.py", line 72, in
load_app
mod = __import__(app_name, {}, {}, ['models'])
File "/usr/local/google/home/p/django/tests/modeltests/defer/models.py",
line 6, in <module>
from django.db.models.query_utils import DeferredAttribute
ImportError: cannot import name DeferredAttribute
Error while importing unmanaged_models: File "runtests.py", line 134, in
django_tests
mod = load_app(model_label)
File "/home/termie/lib/python/django/db/models/loading.py", line 72, in
load_app
mod = __import__(app_name, {}, {}, ['models'])
File
"/usr/local/google/home/p/django/tests/modeltests/unmanaged_models/models.py",
line 20, in <module>
class B01(models.Model):
File "/home/termie/lib/python/django/db/models/base.py", line 55, in
__new__
new_class.add_to_class('_meta', Options(meta, **kwargs))
File "/home/termie/lib/python/django/db/models/base.py", line 165, in
add_to_class
value.contribute_to_class(cls, name)
File "/home/termie/lib/python/django/db/models/options.py", line 92, in
contribute_to_class
raise TypeError, "'class Meta' got invalid attribute(s): %s" %
','.join(meta_attrs.keys())
TypeError: 'class Meta' got invalid attribute(s): managed
Error while importing conditional_processing: File "runtests.py", line
134, in django_tests
mod = load_app(model_label)
File "/home/termie/lib/python/django/db/models/loading.py", line 72, in
load_app
mod = __import__(app_name, {}, {}, ['models'])
File
"/usr/local/google/home/p/django/tests/regressiontests/conditional_processing/models.py",
line 6, in <module>
from django.utils.http import parse_etags, quote_etag
ImportError: cannot import name parse_etags
Error while importing test_client_regress: File "runtests.py", line 134,
in django_tests
mod = load_app(model_label)
File "/home/termie/lib/python/django/db/models/loading.py", line 72, in
load_app
mod = __import__(app_name, {}, {}, ['models'])
File
"/usr/local/google/home/p/django/tests/regressiontests/test_client_regress/models.py",
line 9, in <module>
from django.test.utils import ContextList
ImportError: cannot import name ContextList
Error while importing fixtures_regress: File "runtests.py", line 134, in
django_tests
mod = load_app(model_label)
File "/home/termie/lib/python/django/db/models/loading.py", line 72, in
load_app
mod = __import__(app_name, {}, {}, ['models'])
File
"/usr/local/google/home/p/django/tests/regressiontests/fixtures_regress/models.py",
line 72, in <module>
class WidgetProxy(Widget):
File "/home/termie/lib/python/django/db/models/base.py", line 55, in
__new__
new_class.add_to_class('_meta', Options(meta, **kwargs))
File "/home/termie/lib/python/django/db/models/base.py", line 165, in
add_to_class
value.contribute_to_class(cls, name)
File "/home/termie/lib/python/django/db/models/options.py", line 92, in
contribute_to_class
raise TypeError, "'class Meta' got invalid attribute(s): %s" %
','.join(meta_attrs.keys())
TypeError: 'class Meta' got invalid attribute(s): proxy
Error while importing delete_regress: File "runtests.py", line 134, in
django_tests
mod = load_app(model_label)
File "/home/termie/lib/python/django/db/models/loading.py", line 72, in
load_app
mod = __import__(app_name, {}, {}, ['models'])
File
"/usr/local/google/home/p/django/tests/regressiontests/delete_regress/models.py",
line 4, in <module>
from django.test import TransactionTestCase
ImportError: cannot import name TransactionTestCase
Traceback (most recent call last):
File "runtests.py", line 191, in <module>
django_tests(int(options.verbosity), options.interactive, args)
File "runtests.py", line 134, in django_tests
mod = load_app(model_label)
File "/home/termie/lib/python/django/db/models/loading.py", line 72, in
load_app
mod = __import__(app_name, {}, {}, ['models'])
File "/home/termie/lib/python/django/contrib/webdesign/__init__.py",
line 1, in <module>
KeyboardInterrupt
python runtests.py --settings settings 0.76s user 0.26s system 14% cpu
6.995 total
ter...@termie:p/django/tests % ln -s ../django ./
ter...@termie:p/django/tests % python runtests.py --settings settings
...
}}}
Was all that really necessary?
--
Ticket URL: <http://code.djangoproject.com/ticket/11942>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---