mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-28 00:17:06 +01:00
735cfe3767
This prevents Django from converting times in tests
26 lines
561 B
Python
Executable File
26 lines
561 B
Python
Executable File
#!/usr/bin/env python
|
|
import sys
|
|
import os
|
|
import shutil
|
|
|
|
from django.conf import settings
|
|
from django.core.management import execute_from_command_line
|
|
|
|
from wagtail.tests.settings import STATIC_ROOT, MEDIA_ROOT
|
|
|
|
|
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'wagtail.tests.settings'
|
|
|
|
|
|
def runtests():
|
|
argv = sys.argv[:1] + ['test'] + sys.argv[1:]
|
|
try:
|
|
execute_from_command_line(argv)
|
|
finally:
|
|
shutil.rmtree(STATIC_ROOT, ignore_errors=True)
|
|
shutil.rmtree(MEDIA_ROOT, ignore_errors=True)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
runtests()
|