# -*- coding: utf-8 -*-

import os, sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

from django.core.management import call_command

if __name__ == "__main__":
    import django
    if django.VERSION[:2] >= (1, 7):
        django.setup()
    args = sys.argv[1:]
    if len(args) == 0:
        args.append("pg_array_fields")
    call_command("test", *args, verbosity=2)

# -*- coding: utf-8 -*-

import os, sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

from django.core.management import call_command

if __name__ == "__main__":
    args = sys.argv[1:]
    if len(args) == 0:
        args.append("pg_array_fields")
    call_command("test", *args, verbosity=2)

--- 
+++ 
@@ -6,6 +6,9 @@
 from django.core.management import call_command
 
 if __name__ == "__main__":
+    import django
+    if django.VERSION[:2] >= (1, 7):
+        django.setup()
     args = sys.argv[1:]
     if len(args) == 0:
         args.append("pg_array_fields")
Fix running the tests against Django 1.7.
