예제 #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_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)
예제 #3
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)
예제 #4
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)
예제 #5
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)
예제 #6
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)
예제 #7
0
파일: tests.py 프로젝트: jjhelmus/atmos
 def test_creation_with_vars(self):
     FluidSolver(**self.vars1)
예제 #8
0
파일: tests.py 프로젝트: jjhelmus/atmos
 def test_creation_with_vars_and_method(self):
     FluidSolver(assumptions=('Tv equals T', ), **self.vars1)
예제 #9
0
파일: tests.py 프로젝트: jjhelmus/atmos
 def test_creation_undefined_method(self):
     FluidSolver(assumptions=('moocow', ))
예제 #10
0
파일: tests.py 프로젝트: jjhelmus/atmos
 def test_creation_undefined_method_with_defined_method(self):
     FluidSolver(assumptions=(
         'hydrostatic',
         'moocow',
     ))
예제 #11
0
파일: tests.py 프로젝트: jjhelmus/atmos
 def test_creation_incompatible_methods(self):
     FluidSolver(assumptions=(
         'Goff-Gratch',
         'Wexler',
     ))
예제 #12
0
파일: tests.py 프로젝트: jjhelmus/atmos
 def test_creation_compatible_methods(self):
     FluidSolver(assumptions=(
         'hydrostatic',
         'Tv equals T',
     ))
예제 #13
0
파일: tests.py 프로젝트: jjhelmus/atmos
 def test_creation_one_method(self):
     FluidSolver(assumptions=('hydrostatic', ))
예제 #14
0
파일: tests.py 프로젝트: jjhelmus/atmos
 def test_is_instance_of_BaseSolver(self):
     deriv = FluidSolver()
     assert isinstance(deriv, BaseSolver)
예제 #15
0
파일: tests.py 프로젝트: jjhelmus/atmos
 def test_creation_no_arguments(self):
     FluidSolver()