示例#1
0
文件: tests.py 项目: jjhelmus/atmos
 def test_double_calculation(self):
     deriver = FluidSolver(add_assumptions=('Tv equals T', ), **self.vars2)
     Tv = deriver.calculate('Tv')
     rho = deriver.calculate('rho')
     assert (rho == 1 / Rd).all()
     assert isinstance(rho, np.ndarray)
     assert isinstance(Tv, np.ndarray)
示例#2
0
文件: tests.py 项目: jjhelmus/atmos
 def test_depth_2_calculation(self):
     deriver = FluidSolver(assumptions=FluidSolver.default_assumptions +
                           ('Tv equals T', ),
                           **self.vars2)
     rho = deriver.calculate('rho')
     assert (rho == 1 / Rd).all()
     assert isinstance(rho, np.ndarray)
示例#3
0
文件: tests.py 项目: jjhelmus/atmos
 def test_simple_calculation(self):
     deriver = FluidSolver(**self.vars1)
     rho = deriver.calculate('rho')
     assert (rho == 1 / Rd).all()
     assert isinstance(rho, np.ndarray)
示例#4
0
文件: tests.py 项目: jjhelmus/atmos
 def test_creation_with_vars(self):
     FluidSolver(**self.vars1)
示例#5
0
文件: tests.py 项目: jjhelmus/atmos
 def test_creation_with_vars_and_method(self):
     FluidSolver(assumptions=('Tv equals T', ), **self.vars1)
示例#6
0
文件: tests.py 项目: jjhelmus/atmos
 def test_creation_undefined_method(self):
     FluidSolver(assumptions=('moocow', ))
示例#7
0
文件: tests.py 项目: jjhelmus/atmos
 def test_creation_undefined_method_with_defined_method(self):
     FluidSolver(assumptions=(
         'hydrostatic',
         'moocow',
     ))
示例#8
0
文件: tests.py 项目: jjhelmus/atmos
 def test_creation_incompatible_methods(self):
     FluidSolver(assumptions=(
         'Goff-Gratch',
         'Wexler',
     ))
示例#9
0
文件: tests.py 项目: jjhelmus/atmos
 def test_creation_compatible_methods(self):
     FluidSolver(assumptions=(
         'hydrostatic',
         'Tv equals T',
     ))
示例#10
0
文件: tests.py 项目: jjhelmus/atmos
 def test_creation_one_method(self):
     FluidSolver(assumptions=('hydrostatic', ))
示例#11
0
文件: tests.py 项目: jjhelmus/atmos
 def test_is_instance_of_BaseSolver(self):
     deriv = FluidSolver()
     assert isinstance(deriv, BaseSolver)
示例#12
0
文件: tests.py 项目: jjhelmus/atmos
 def test_creation_no_arguments(self):
     FluidSolver()