Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SMART
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UNI-KLU
SMART
Commits
fb012428
Commit
fb012428
authored
Feb 15, 2021
by
Bogdan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Python3.7 to cmd
parent
dd9f898f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
testing.py
bin/testing.py
+5
-5
No files found.
bin/testing.py
View file @
fb012428
...
...
@@ -38,7 +38,7 @@ for (dirname, dirs, files) in os.walk(ROOT):
exit_val
=
os
.
system
(
f
"{PY} -m pip install -r ../requirements.txt"
)
# install pip dependencies
#resultCodeList.append(exit_val)
#exit_val = os.system(f"{PY} -m unittest discover") # execute the tests
exit_val
=
os
.
system
(
f
"coverage run --append --omit=*/site-packages*,*/dist-packages* -m unittest discover"
)
#TEST CODE COVERAGE
exit_val
=
os
.
system
(
f
"
python3.7 -m
coverage run --append --omit=*/site-packages*,*/dist-packages* -m unittest discover"
)
#TEST CODE COVERAGE
coverage_paths_set
.
add
(
os
.
path
.
normpath
(
dirname
))
resultCodeList
.
append
(
exit_val
)
#once per folder i.e if 3 tests are in a folder and crash, there will be just one exit val
...
...
@@ -57,7 +57,7 @@ for (dirname, dirs, files) in os.walk(ROOT):
#cur_dir = os.path(dirname).parent()
os
.
chdir
(
cur_dir
)
print
(
f
"Executing coverage test in {cur_dir}"
)
exit_val
=
os
.
system
(
f
"coverage run --append --omit=*/site-packages* -m unittest discover"
)
exit_val
=
os
.
system
(
f
"
python3.7 -m
coverage run --append --omit=*/site-packages* -m unittest discover"
)
coverage_paths_set
.
add
(
os
.
path
.
normpath
(
cur_dir
))
except
Exception
as
e
:
...
...
@@ -99,9 +99,9 @@ for path in coverage_paths_set:
continue
print
(
"Generating Combined report"
)
os
.
system
(
"coverage combine"
)
os
.
system
(
"coverage xml"
)
os
.
system
(
"coverage html"
)
#if you want to generate the html as well
os
.
system
(
"
python3.7 -m
coverage combine"
)
os
.
system
(
"
python3.7 -m
coverage xml"
)
os
.
system
(
"
python3.7 -m
coverage html"
)
#if you want to generate the html as well
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment