-
-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathruntests.py
More file actions
30 lines (24 loc) · 755 Bytes
/
runtests.py
File metadata and controls
30 lines (24 loc) · 755 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
# -*- 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_notebook', '-v', '-rw', '--durations=10',
'--cov=spyder_notebook', '--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()