-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruntests.py
More file actions
34 lines (27 loc) · 869 Bytes
/
runtests.py
File metadata and controls
34 lines (27 loc) · 869 Bytes
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
26
27
28
29
30
31
32
33
34
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright © QtAppUtils Project Contributors
# https://github.com/jnsebgosselin/qtapputils
#
# This file is part of QtAppUtils.
# Licensed under the terms of the MIT License.
# -----------------------------------------------------------------------------
"""
File for running tests programmatically.
"""
import os
os.environ['QTAPPUTILS_PYTEST'] = 'True'
import pytest
def main():
"""
Run pytest tests.
"""
args = ['-x', 'qtapputils', '-v', '-rw', '--durations=10',
'--cov=qtapputils', '-o', 'junit_family=xunit2']
if os.environ.get('Azure', None) is not None:
args.append('--no-coverage-upload')
errno = pytest.main(args)
if errno != 0:
raise SystemExit(errno)
if __name__ == '__main__':
main()