Commit 31a75c03 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

updated tests

parent 92e3a224
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__':
......
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