
import os, sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'test_project.settings'

test_dir = os.path.dirname(__file__)
sys.path.insert(0, test_dir)

from django.test.utils import get_runner
from django.conf import settings

def runtests():
    test_runner = get_runner(settings)
    failures = test_runner().run_tests([])
    sys.exit(failures)

if __name__ == '__main__':
    runtests()


import os, sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'test_project.settings'

test_dir = os.path.dirname(__file__)
sys.path.insert(0, test_dir)

from django.test.utils import get_runner
from django.conf import settings

def runtests():
    test_runner = get_runner(settings)
    failures = test_runner([])
    sys.exit(failures)

if __name__ == '__main__':
    runtests()

Fix the running of tests. Wonder if this is a django regression.
Fix the running of tests. Wonder if this is a django regression.

  
  import os, sys
  os.environ['DJANGO_SETTINGS_MODULE'] = 'test_project.settings'
  
  test_dir = os.path.dirname(__file__)
  sys.path.insert(0, test_dir)
  
  from django.test.utils import get_runner
  from django.conf import settings
  
  def runtests():
      test_runner = get_runner(settings)
-     failures = test_runner().run_tests([])
+     failures = test_runner([])
      sys.exit(failures)
  
  if __name__ == '__main__':
      runtests()
  
Fix the running of tests. Wonder if this is a django regression.
## Code Before:

import os, sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'test_project.settings'

test_dir = os.path.dirname(__file__)
sys.path.insert(0, test_dir)

from django.test.utils import get_runner
from django.conf import settings

def runtests():
    test_runner = get_runner(settings)
    failures = test_runner().run_tests([])
    sys.exit(failures)

if __name__ == '__main__':
    runtests()

## Instruction:
Fix the running of tests. Wonder if this is a django regression.
## Code After:

import os, sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'test_project.settings'

test_dir = os.path.dirname(__file__)
sys.path.insert(0, test_dir)

from django.test.utils import get_runner
from django.conf import settings

def runtests():
    test_runner = get_runner(settings)
    failures = test_runner([])
    sys.exit(failures)

if __name__ == '__main__':
    runtests()
