Control: tag -1 + confirmed

The package fails to build with Django 1.7:

   debian/rules override_dh_auto_test
make[1]: Entering directory '/«PKGBUILDDIR»'
set -e; \
cd voting/tests; \
for python in python2.7; do \
        PYTHONPATH=:../.. $python runtests.py; \
done
Traceback (most recent call last):
  File "runtests.py", line 7, in <module>
    failures = runner.run_tests(None)
  File "/usr/lib/python2.7/dist-packages/django/test/runner.py", line 146, in 
run_tests
    suite = self.build_suite(test_labels, extra_tests)
  File "/usr/lib/python2.7/dist-packages/django/test/simple.py", line 244, in 
build_suite
    for app_config in apps.get_app_configs():
  File "/usr/lib/python2.7/dist-packages/django/apps/registry.py", line 137, in 
get_app_configs
    self.check_apps_ready()
  File "/usr/lib/python2.7/dist-packages/django/apps/registry.py", line 124, in 
check_apps_ready
    raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
make[1]: *** [override_dh_auto_test] Error 1


To get past this error you need to add this to your test script:

import django
if hasattr(django, 'setup'):
    django.setup()

Cheers,

-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/

_______________________________________________
Python-modules-team mailing list
Python-modules-team@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to