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
141ef2c6
Commit
141ef2c6
authored
Mar 04, 2020
by
niklas.baumgarten
Browse files
introduced python tests for mlmc
parent
9707f3da
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/test_experiments.py
0 → 100644
View file @
141ef2c6
import
sys
from
unittest
import
TestCase
,
main
sys
.
path
.
append
(
'.'
)
from
mlmc_mppy
import
mpp
class
TestExperiments
(
TestCase
):
@
classmethod
def
setUpClass
(
cls
):
mpp
.
mute
=
False
mpp
.
build
()
@
classmethod
def
tearDownClass
(
cls
):
# mpp.clean_build()
pass
def
setUp
(
self
):
mpp
.
clean_data
()
def
tearDown
(
self
):
mpp
.
clean_data
()
class
TestBasics
(
TestExperiments
):
def
test_git_repo
(
self
):
self
.
assertEqual
(
mpp
.
check_git_project
(),
0
)
def
test_build
(
self
):
self
.
assertEqual
(
mpp
.
build
(),
0
)
def
test_run
(
self
):
kwargs
=
{
'maxLevel'
:
5
}
self
.
assertEqual
(
mpp
.
run
(
4
,
config
=
'mlmc_elliptic'
,
kwargs
=
kwargs
),
0
)
if
__name__
==
'__main__'
:
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