Commit 141ef2c6 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

introduced python tests for mlmc

parent 9707f3da
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()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment