Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Mpp
MLUQ
Commits
31a75c03
Commit
31a75c03
authored
Mar 04, 2020
by
niklas.baumgarten
Browse files
updated tests
parent
92e3a224
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/test_experiments.py
View file @
31a75c03
import
sys
from
unittest
import
TestCase
,
main
import
sys
import
os
sys
.
path
.
append
(
'.'
)
...
...
@@ -37,12 +38,16 @@ class TestBasics(TestExperiments):
class
TestEllipticConvergence
(
TestExperiments
):
def
test_smoothing_experiment
(
self
):
self
.
assertTrue
(
not
os
.
listdir
(
mpp
.
PROJECT_PY_DATA_DIR
))
mpp
.
mute
=
False
kwargs
=
{
'Experiment'
:
'ConvergenceTest'
}
kwargs
=
{
'Experiment'
:
'ConvergenceTest'
,
'initLevels'
:
'3, 4, 5, 6, 7, 8, 9'
}
smoothings
=
[
1.0
,
1.4
,
1.8
]
for
smoothing
in
smoothings
:
kwargs
[
'smoothing'
]
=
smoothing
self
.
assertEqual
(
mpp
.
run
(
32
,
config
=
'mlmc_elliptic'
,
kwargs
=
kwargs
),
0
)
self
.
assertEqual
(
mpp
.
run
(
4
,
config
=
'mlmc_elliptic'
,
kwargs
=
kwargs
),
0
)
mpp
.
show_convergence_table
(
plot_name
=
'Test'
)
mpp
.
save_convergence_table
(
table_name
=
'Test'
)
self
.
assertEqual
(
len
(
os
.
listdir
(
mpp
.
PROJECT_PY_DATA_DIR
)),
6
)
if
__name__
==
'__main__'
:
...
...
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