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; \
for python in python2.7; do \
        PYTHONPATH="." $python runtests.py; \
done
Traceback (most recent call last):
  File "runtests.py", line 58, in <module>
    main()
  File "runtests.py", line 53, in main
    failures = runtests()
  File "runtests.py", line 49, in runtests
    failures = test_runner.run_tests(INSTALLED_APPS)
  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 241, in 
build_suite
    app_config = apps.get_app_config(label)
  File "/usr/lib/python2.7/dist-packages/django/apps/registry.py", line 146, in 
get_app_config
    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/


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to