Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WindEnergyToolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
toolbox
WindEnergyToolbox
Commits
f9ab38c8
There was a problem fetching the pipeline summary.
Commit
f9ab38c8
authored
9 years ago
by
mads
Browse files
Options
Downloads
Patches
Plain Diff
call testsuite from any working directory
parent
07feda9f
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/testsuite.py
+6
-6
6 additions, 6 deletions
tests/testsuite.py
with
6 additions
and
6 deletions
tests/testsuite.py
+
6
−
6
View file @
f9ab38c8
import
glob
import
unittest
import
os
from
os.path
import
dirname
,
relpath
,
abspath
def
module_strings
():
test_file_paths
=
glob
.
glob
(
'
test_*.py
'
)
test_file_paths
=
[]
#test_file_strings.extend(glob.glob('../wetb/**/test_*.py'))
#for root,_,_ in os.walk("../wetb/"):
for
folder
,
_
,
_
in
os
.
walk
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
)
,
'
../wetb
'
)):
test_file_paths
.
extend
(
glob
.
glob
(
os
.
path
.
join
(
folder
,
"
tests/test_*.py
"
))
)
return
[
s
[
3
:
len
(
s
)
-
3
]
.
replace
(
os
.
path
.
sep
,
"
.
"
)
for
s
in
test_file_paths
]
for
folder
,
_
,
_
in
os
.
walk
(
os
.
path
.
abs
path
(
dirname
(
__file__
)
+
'
/
../wetb
/
'
)):
test_file_paths
.
extend
(
glob
.
glob
(
folder
+
"
/
tests/test_*.py
"
))
return
[
relpath
(
s
,
abspath
(
dirname
(
__file__
)
+
"
/../
"
)).
replace
(
"
.py
"
,
""
)
.
replace
(
os
.
path
.
sep
,
"
.
"
)
for
s
in
test_file_paths
]
def
suite
():
...
...
@@ -60,4 +60,4 @@ else:
for
mstr
in
module_strings
():
print
(
mstr
)
__import__
(
mstr
,
{},
{},
"
*
"
)
exec
(
"
from %s import *
"
%
mstr
)
\ No newline at end of file
exec
(
"
from %s import *
"
%
mstr
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment