File: run_tests.py

package info (click to toggle)
django-haystack 3.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,512 kB
  • sloc: python: 23,577; xml: 1,708; makefile: 71; sh: 65
file content (25 lines) | stat: -rwxr-xr-x 561 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python
import sys
from os.path import abspath, dirname

import nose


def run_all(argv=None):
    sys.exitfunc = lambda: sys.stderr.write("Shutting down....\n")

    # always insert coverage when running tests through setup.py
    if argv is None:
        argv = [
            "nosetests",
            "--with-coverage",
            "--cover-package=haystack",
            "--cover-erase",
            "--verbose",
        ]

    nose.run_exit(argv=argv, defaultTest=abspath(dirname(__file__)))


if __name__ == "__main__":
    run_all(sys.argv)