FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
climada_python/tests_install.py at main · NaveenRshahi/climada_python · GitHub
NaveenRshahi
/
climada_python
Public
forked from
CLIMADA-project/climada_python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
climada_python
/
tests_install.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (29 loc) · 1.04 KB
Breadcrumbs
climada_python
/
tests_install.py
Copy path
File metadata and controls
34 lines (29 loc) · 1.04 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!/usr/bin/env python
# coding: utf-8
import
os
import
sys
import
unittest
import
matplotlib
from
climada
.
util
.
constants
import
SOURCE_DIR
def
find_install_tests
():
"""select unit tests."""
suite
=
unittest
.
TestLoader
().
discover
(
start_dir
=
'climada.engine.test'
,
pattern
=
'test_cost_benefit.py'
)
suite
.
addTest
(
unittest
.
TestLoader
().
discover
(
start_dir
=
'climada.engine.test'
,
pattern
=
'test_impact.py'
))
return
suite
def
main
():
"""parse input argument: None or 'report'. Execute accordingly."""
if
sys
.
argv
[
1
:]:
import
xmlrunner
arg
=
sys
.
argv
[
1
]
if
arg
==
'report'
:
output
=
os
.
path
.
join
(
SOURCE_DIR
,
'../tests_xml'
)
xmlrunner
.
XMLTestRunner
(
output
=
output
).
run
(
find_install_tests
())
else
:
# execute without xml reports
unittest
.
TextTestRunner
(
verbosity
=
2
).
run
(
find_install_tests
())
if
__name__
==
'__main__'
:
matplotlib
.
use
(
"Agg"
)
sys
.
path
.
append
(
os
.
getcwd
())
main
()
Back
|
FazBrowse Home
|
New Git URL