Commit 7430678c authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

added tests

parent ef8bd619
Pipeline #73930 canceled with stage
......@@ -9,7 +9,7 @@ from mlmc_mppy import mpp
class TestExperiments(TestCase):
@classmethod
def setUpClass(cls):
mpp.mute = False
mpp.mute = True
mpp.build()
@classmethod
......@@ -32,8 +32,17 @@ class TestBasics(TestExperiments):
self.assertEqual(mpp.build(), 0)
def test_run(self):
kwargs = {'maxLevel': 5}
self.assertEqual(mpp.run(4, config='mlmc_elliptic', kwargs=kwargs), 0)
self.assertEqual(mpp.run(4, config='mlmc_elliptic'), 0)
class TestEllipticConvergence(TestExperiments):
def test_smoothing_experiment(self):
mpp.mute = False
kwargs = {'Experiment': 'ConvergenceTest'}
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)
if __name__ == '__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