File: utest.py

package info (click to toggle)
dnspython 1.16.0-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,520 kB
  • sloc: python: 12,540; makefile: 62
file content (13 lines) | stat: -rw-r--r-- 372 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
import os.path
import sys
import unittest

if __name__ == '__main__':
    sys.path.insert(0, os.path.realpath('..'))
    if len(sys.argv) > 1:
        pattern = sys.argv[1]
    else:
        pattern = 'test*.py'
    suites = unittest.defaultTestLoader.discover('.', pattern)
    if not unittest.TextTestRunner(verbosity=2).run(suites).wasSuccessful():
        sys.exit(1)