Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ellipsyswrapper
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
Model registry
Operate
Environments
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
EllipSys
ellipsyswrapper
Commits
7018506e
Commit
7018506e
authored
4 years ago
by
mham
Browse files
Options
Downloads
Patches
Plain Diff
adding cleanup method
parent
cbe4a2ce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#18200
passed
4 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ellipsyswrapper/testsuite.py
+15
-1
15 additions, 1 deletion
ellipsyswrapper/testsuite.py
with
15 additions
and
1 deletion
ellipsyswrapper/testsuite.py
+
15
−
1
View file @
7018506e
...
@@ -300,7 +300,7 @@ class EllipSysTestCase(object):
...
@@ -300,7 +300,7 @@ class EllipSysTestCase(object):
self
.
casedict
[
'
directory
'
])):
self
.
casedict
[
'
directory
'
])):
raise
unittest
.
SkipTest
(
'
Testcase directory not found
'
)
raise
unittest
.
SkipTest
(
'
Testcase directory not found
'
)
case
=
CaseRunner
(
self
.
casedict
)
self
.
case
=
case
=
CaseRunner
(
self
.
casedict
)
if
'
casename
'
not
in
self
.
casedict
.
keys
():
if
'
casename
'
not
in
self
.
casedict
.
keys
():
case
.
casename
=
self
.
__class__
.
__name__
.
split
(
'
.
'
)[
-
1
]
case
.
casename
=
self
.
__class__
.
__name__
.
split
(
'
.
'
)[
-
1
]
case
.
run_case
()
case
.
run_case
()
...
@@ -346,3 +346,17 @@ class EllipSysTestCase(object):
...
@@ -346,3 +346,17 @@ class EllipSysTestCase(object):
np
.
testing
.
assert_allclose
(
expected
,
result
,
np
.
testing
.
assert_allclose
(
expected
,
result
,
rtol
=
10
**
(
-
case
.
tol
),
rtol
=
10
**
(
-
case
.
tol
),
atol
=
10
**
(
-
case
.
tol
))
atol
=
10
**
(
-
case
.
tol
))
def
tearDown
(
self
):
"""
Clears the test folder before test machine loads to cache.
"""
# get directory
testroot
=
'
/
'
.
join
(
self
.
case
.
directory
.
split
(
'
/
'
)[:
-
1
])
test_dir
=
os
.
path
.
join
(
testroot
,
self
.
case
.
casename
)
if
os
.
path
.
exists
(
test_dir
):
print
(
'
removing test data
'
)
os
.
system
(
'
ls -a *
'
)
shutil
.
rmtree
(
test_dir
)
os
.
system
(
'
ls -a *
'
)
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