pysuperconductor/tests/test_sc_free_energy.py
Deepak 7843e462de
All checks were successful
gitea-physics/pysuperconductor/pipeline/head This commit looks good
Adding new sc free energy file
2021-01-04 15:04:42 -06:00

23 lines
678 B
Python

import pysuperconductor.sc_free_energy
import numpy
import pytest
def test_sc_free_energy():
with pytest.warns(None) as record:
actual = pysuperconductor.sc_free_energy.sc_free_energy(
0.907816, .5, .247777, 100, 1, .2)
assert not record
numpy.testing.assert_almost_equal(
actual, 9999.35,
decimal=7, err_msg='superconducting free energy was off', verbose=True
)
with pytest.warns(None) as record:
actual = pysuperconductor.sc_free_energy.sc_free_energy(
0.907816, .5, .247777, 50, 1, .2)
assert not record
# numpy.testing.assert_almost_equal(
# actual, 2498.910078644398,
# decimal=7, err_msg='superconducting free energy was off', verbose=True
# )