-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruntests.py
35 lines (29 loc) · 820 Bytes
/
runtests.py
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
35
# -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
#
"""File for running tests programmatically."""
# Third party imports
import pytest
def main():
"""Run pytest tests."""
errno = pytest.main(
[
"-x",
"spyder_okvim",
"-v",
"-rw",
"--durations=30",
"--cov=spyder_okvim",
"--cov-report=term-missing",
]
)
# sys.exit doesn't work here because some things could be running
# in the background (e.g. closing the main window) when this point
# is reached. And if that's the case, sys.exit does't stop the
# script (as you would expected).
if errno != 0:
raise SystemExit(errno)
if __name__ == "__main__":
main()