mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-12 12:30:37 +08:00
Merge branch 'em/dev' into em/rx
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
if __name__ == '__main__':
|
||||
import os
|
||||
import glob
|
||||
import unittest
|
||||
test_file_strings = glob.glob('test_*.py')
|
||||
module_strings = [str[0:len(str)-3] for str in test_file_strings]
|
||||
suites = [unittest.defaultTestLoader.loadTestsFromName(str) for str
|
||||
in module_strings]
|
||||
testSuite = unittest.TestSuite(suites)
|
||||
|
||||
unittest.TextTestRunner(verbosity=2).run(testSuite)
|
||||
@@ -1,10 +0,0 @@
|
||||
import unittest, os
|
||||
from SimPEG.EM import Examples
|
||||
|
||||
class EM_ExamplesRunning(unittest.TestCase):
|
||||
|
||||
def test_CylInversion(self):
|
||||
Examples.CylInversion.run(plotIt=False)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -39,7 +39,7 @@ def derivTest(fdemType, comp):
|
||||
survey = prb.survey
|
||||
def fun(x):
|
||||
return survey.dpred(x), lambda x: prb.Jvec(x0, x)
|
||||
return Tests.checkDerivative(fun, x0, num=3, plotIt=False, eps=FLR)
|
||||
return Tests.checkDerivative(fun, x0, num=2, plotIt=False, eps=FLR)
|
||||
|
||||
|
||||
class FDEM_DerivTests(unittest.TestCase):
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
import unittest
|
||||
import sys
|
||||
from SimPEG.Examples import Linear, DCfwd
|
||||
from SimPEG import Examples
|
||||
import numpy as np
|
||||
|
||||
class TestLinear(unittest.TestCase):
|
||||
def test_running(self):
|
||||
Linear.run(100, plotIt=False)
|
||||
def get(test):
|
||||
def test_func(self):
|
||||
print '\nTesting %s.run(plotIt=False)\n'%test
|
||||
getattr(Examples, test).run(plotIt=False)
|
||||
self.assertTrue(True)
|
||||
return test_func
|
||||
attrs = dict()
|
||||
for test in Examples.__examples__:
|
||||
attrs['test_'+test] = get(test)
|
||||
|
||||
TestExamples = type('TestExamples', (unittest.TestCase,), attrs)
|
||||
|
||||
class TestDCfwd(unittest.TestCase):
|
||||
def test_running(self):
|
||||
DCfwd.run(plotIt=False)
|
||||
self.assertTrue(True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import unittest
|
||||
import sys
|
||||
from SimPEG.FLOW.Examples import Celia1990
|
||||
import numpy as np
|
||||
|
||||
class TestCelia1990(unittest.TestCase):
|
||||
def test_running(self):
|
||||
Celia1990.run(plotIt=False)
|
||||
self.assertTrue(True)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user