mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
24 lines
582 B
Python
Executable file
24 lines
582 B
Python
Executable file
#!/usr/bin/env python
|
|
from __future__ import unicode_literals
|
|
|
|
import sys
|
|
|
|
from django import setup
|
|
from django.conf import settings
|
|
from django.test.runner import DiscoverRunner as TestRunner
|
|
|
|
from dpaste.settings import tests as test_settings
|
|
|
|
|
|
def runtests(*test_args):
|
|
# Setup settings
|
|
if not settings.configured:
|
|
settings.configure(**test_settings.__dict__)
|
|
setup()
|
|
test_runner = TestRunner(verbosity=1)
|
|
failures = test_runner.run_tests(['dpaste'])
|
|
if failures:
|
|
sys.exit(failures)
|
|
|
|
if __name__ == '__main__':
|
|
runtests(*sys.argv[1:])
|