Debian Codegraph @

tests/runtests.py

raw
1 #!/usr/bin/env python
2
3 # Copyright New York University and the in-toto contributors
4 # SPDX-License-Identifier: Apache-2.0
5
6 """
7 <Program Name>
8 runtests.py
9
10 <Author>
11 Santiago Torres <[email protected]>
12 Lukas Puehringer <[email protected]>
13
14 <Started>
15 May 23, 2016
16
17 <Copyright>
18 See LICENSE for licensing information.
19
20 <Purpose>
21 Script to search, load and run in-toto tests using the Python `unittest`
22 framework.
23 """
24
25 import sys
26 from unittest import TextTestRunner, defaultTestLoader
27
28 suite = defaultTestLoader.discover(start_dir=".")
29 result = TextTestRunner(verbosity=2, buffer=True).run(suite)
30 sys.exit(0 if result.wasSuccessful() else 1)