2014-02-13 13:44:49 +01:00
|
|
|
#!/usr/bin/env python
|
2014-02-17 12:03:41 +01:00
|
|
|
import sys
|
|
|
|
import os
|
|
|
|
import shutil
|
2014-02-13 13:44:49 +01:00
|
|
|
|
|
|
|
from django.core.management import execute_from_command_line
|
|
|
|
|
2014-06-30 16:08:09 +02:00
|
|
|
from wagtail.tests.settings import STATIC_ROOT, MEDIA_ROOT
|
2014-02-13 13:44:49 +01:00
|
|
|
|
2014-02-14 18:17:31 +01:00
|
|
|
|
2014-06-30 16:08:09 +02:00
|
|
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'wagtail.tests.settings'
|
2014-02-13 13:44:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
def runtests():
|
|
|
|
argv = sys.argv[:1] + ['test'] + sys.argv[1:]
|
2014-02-13 13:53:52 +01:00
|
|
|
try:
|
|
|
|
execute_from_command_line(argv)
|
|
|
|
finally:
|
|
|
|
shutil.rmtree(STATIC_ROOT, ignore_errors=True)
|
2014-02-23 15:57:33 +01:00
|
|
|
shutil.rmtree(MEDIA_ROOT, ignore_errors=True)
|
2014-02-13 13:44:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
runtests()
|