wagtail-birdsong/runtests.py

20 lines
505 B
Python
Raw Normal View History

2021-11-23 03:12:48 +00:00
#!/usr/bin/env python3
2020-05-29 01:56:25 +00:00
import os
import shutil
import sys
def run():
from django.core.management import execute_from_command_line
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.app.settings'
try:
execute_from_command_line([sys.argv[0], 'test'] + sys.argv[1:])
finally:
from tests.app.settings import STATIC_ROOT, MEDIA_ROOT
shutil.rmtree(STATIC_ROOT, ignore_errors=True)
shutil.rmtree(MEDIA_ROOT, ignore_errors=True)
if __name__ == '__main__':
2021-11-23 03:12:48 +00:00
run()