Skip to content

Commit

Permalink
Update tests in python code.
Browse files Browse the repository at this point in the history
  • Loading branch information
MilanSkocic committed Nov 18, 2024
1 parent d1237a2 commit 60613f4
Showing 1 changed file with 66 additions and 132 deletions.
198 changes: 66 additions & 132 deletions py/test/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def test_year():
def test_ALPHA_PARTICLE_ELECTRON_MASS_RATIO():
assert ALPHA_PARTICLE_ELECTRON_MASS_RATIO["value"] ==7294.29954171


def test_ALPHA_PARTICLE_MASS():
assert ALPHA_PARTICLE_MASS["value"] == 6.6446573450e-27

Expand All @@ -29,135 +28,70 @@ def test_ATOMIC_MASS_CONSTANT():
def test_AVOGADRO_CONSTANT():
assert AVOGADRO_CONSTANT["value"] == 6.02214076e23

def test_BOLTZMANN_CONSTANT():
assert BOLTZMANN_CONSTANT["value"] == 1.380649e-23

def test_ELECTRON_VOLT():
assert ELECTRON_VOLT["value"] == 1.602176634e-19

def test_ELEMENTARY_CHARGE():
assert ELEMENTARY_CHARGE["value"] == 1.602176634e-19

def test_FARADAY_CONSTANT():
assert FARADAY_CONSTANT["value"] == 96485.33212e0

def test_MOLAR_MASS_CONSTANT():
assert MOLAR_MASS_CONSTANT["value"] == 1.00000000105e-3

def test_MOLAR_VOLUME_NTP():
assert MOLAR_VOLUME_OF_IDEAL_GAS_273_15_K_101_325_KPA["value"] == 22.41396954e-3

def test_PLANCK_CONSTANT():
assert PLANCK_CONSTANT["value"] == 6.62607015e-34

def test_SPEED_OF_LIGHT():
assert SPEED_OF_LIGHT_IN_VACUUM["value"] == 299792458.0e0

def test_STANDARD_ACCELERATION_OF_GRAVITY():
assert STANDARD_ACCELERATION_OF_GRAVITY["value"] == 9.80665e0

def test_U_ALPHA_PARTICLE_ELECTRON_MASS_RATIO():
assert ALPHA_PARTICLE_ELECTRON_MASS_RATIO["uncertainty"] == 0.00000017e0

def test_U_ALPHA_PARTICLE_MASS():
assert ALPHA_PARTICLE_MASS["uncertainty"] == 0.0000000021e-27

def test_U_ATOMIC_MASS_CONSTANT():
assert ATOMIC_MASS_CONSTANT["uncertainty"] == 0.00000000052e-27

def test_U_AVOGADRO_CONSTANT():
assert AVOGADRO_CONSTANT["uncertainty"] == 0.0

def test_U_BOLTZMANN_CONSTANT():
assert BOLTZMANN_CONSTANT["uncertainty"] == 0.0

def test_U_ELECTRON_VOLT():
assert ELECTRON_VOLT["uncertainty"] == 0.0

def test_U_ELEMENTARY_CHARGE():
assert ELEMENTARY_CHARGE["uncertainty"] == 0.0

def test_U_FARADAY_CONSTANT():
assert FARADAY_CONSTANT["uncertainty"] == 0.0

def test_U_MOLAR_MASS_CONSTANT():
assert MOLAR_MASS_CONSTANT["uncertainty"] == 0.00000000031e-3

def test_U_MOLAR_VOLUME_NTP():
assert MOLAR_VOLUME_OF_IDEAL_GAS_273_15_K_101_325_KPA["uncertainty"] == 0.0

def test_U_PLANCK_CONSTANT():
assert PLANCK_CONSTANT["uncertainty"] == 0.0

def test_U_SPEED_OF_LIGHT():
assert SPEED_OF_LIGHT_IN_VACUUM["uncertainty"] == 0.0

def test_U_STANDARD_ACCELERATION_OF_GRAVITY():
assert STANDARD_ACCELERATION_OF_GRAVITY["uncertainty"] == 0.0


# subroutine test_BOLTZMANN_CONSTANT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, BOLTZMANN_CONSTANT%to_real(1.0_dp), 1.380649d-23)
# if (allocated(error)) return
# end subroutine

# subroutine test_ELECTRON_VOLT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, ELECTRON_VOLT%to_real(1.0_dp), 1.602176634d-19)
# if (allocated(error)) return
# end subroutine

# subroutine test_ELEMENTARY_CHARGE(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, ELEMENTARY_CHARGE%to_real(1.0_dp), 1.602176634d-19)
# if (allocated(error)) return
# end subroutine

# subroutine test_FARADAY_CONSTANT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, FARADAY_CONSTANT%to_real(1.0_dp), 96485.33212d0)
# if (allocated(error)) return
# end subroutine

# subroutine test_MOLAR_MASS_CONSTANT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, MOLAR_MASS_CONSTANT%to_real(1.0_dp), 1.00000000105d-3)
# if (allocated(error)) return
# end subroutine

# subroutine test_MOLAR_VOLUME_NTP(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, MOLAR_VOLUME_OF_IDEAL_GAS_273_15_K_101_325_KPA%to_real(1.0_dp), 22.41396954d-3)
# if (allocated(error)) return
# end subroutine

# subroutine test_PLANCK_CONSTANT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, PLANCK_CONSTANT%to_real(1.0_dp), 6.62607015d-34)
# if (allocated(error)) return
# end subroutine

# subroutine test_SPEED_OF_LIGHT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, SPEED_OF_LIGHT_IN_VACUUM%to_real(1.0_dp), 299792458.0d0)
# if (allocated(error)) return
# end subroutine

# subroutine test_STANDARD_ACCELERATION_OF_GRAVITY(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, STANDARD_ACCELERATION_OF_GRAVITY%to_real(1.0_dp), 9.80665d0)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_ALPHA_PARTICLE_ELECTRON_MASS_RATIO(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, ALPHA_PARTICLE_ELECTRON_MASS_RATIO%to_real(1.0_dp, uncertainty=.true.), 0.00000017d0)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_ALPHA_PARTICLE_MASS(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, ALPHA_PARTICLE_MASS%to_real(1.0_dp, uncertainty=.true.), 0.0000000021d-27)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_ATOMIC_MASS_CONSTANT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, ATOMIC_MASS_CONSTANT%to_real(1.0_dp, uncertainty=.true.), 0.00000000052d-27)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_AVOGADRO_CONSTANT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, AVOGADRO_CONSTANT%to_real(1.0_dp, uncertainty=.true.), 0.0_dp)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_BOLTZMANN_CONSTANT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, BOLTZMANN_CONSTANT%to_real(1.0_dp, uncertainty=.true.), 0.0_dp)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_ELECTRON_VOLT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, ELECTRON_VOLT%to_real(1.0_dp, uncertainty=.true.), 0.0_dp)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_ELEMENTARY_CHARGE(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, ELEMENTARY_CHARGE%to_real(1.0_dp, uncertainty=.true.), 0.0_dp)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_FARADAY_CONSTANT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, FARADAY_CONSTANT%to_real(1.0_dp, uncertainty=.true.), 0.0_dp)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_MOLAR_MASS_CONSTANT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, MOLAR_MASS_CONSTANT%to_real(1.0_dp, uncertainty=.true.), 0.00000000031d-3)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_MOLAR_VOLUME_NTP(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, MOLAR_VOLUME_OF_IDEAL_GAS_273_15_K_101_325_KPA%to_real(1.0_dp, uncertainty=.true.), 0.0_dp)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_PLANCK_CONSTANT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, PLANCK_CONSTANT%to_real(1.0_dp, uncertainty=.true.), 0.0_dp)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_SPEED_OF_LIGHT(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, SPEED_OF_LIGHT_IN_VACUUM%to_real(1.0_dp, uncertainty=.true.), 0.0_dp)
# if (allocated(error)) return
# end subroutine

# subroutine test_U_STANDARD_ACCELERATION_OF_GRAVITY(error)
# type(error_type), allocatable, intent(out) :: error
# call check(error, STANDARD_ACCELERATION_OF_GRAVITY%to_real(1.0_dp, uncertainty=.true.), 0.0_dp)
# if (allocated(error)) return
# end subroutine

0 comments on commit 60613f4

Please sign in to comment.