# Path: auxi/tools/chemistry/thermochemistry.py
# class CpRecord(Object):
# class Phase(NamedObject):
# class Compound(Object):
#     def __init__(self, dictionary):
#     def __str__(self):
#     def Cp(self, T):
#     def H(self, T):
#     def S(self, T):
#     def __init__(self, dictionary):
#     def _init(self):
#     def __str__(self):
#     def Zero_mag(self, T):
#     def Cp(self, T):
#     def Cp_mag(self, T):
#     def H(self, T):
#     def H_mag(self, T):
#     def S(self, T):
#     def S_mag(self, T):
#     def G(self, T):
#     def G_mag(self, T):
#     def __init__(self, dictionary):
#     def _init(self):
#     def get_phase_list(self):
#     def get_reference(self):
#     def Cp(self, phase, T):
#     def H(self, phase, T):
#     def S(self, phase, T):
#     def G(self, phase, T):
# def _get_default_data_path_():
# def _read_compound_from_factsage_file_(file_name):
# def _split_compound_string_(compound_string):
# def _finalise_result_(compound, value, mass):
# def _read_compound_from_auxi_file_(file_name):
# def write_compound_to_auxi_file(directory, compound):
# def load_data_factsage(path=''):
# def load_data_auxi(path=''):
# def list_compounds():
# def get_datafile_references():
# def molar_mass(compound):
# def Cp(compound_string, T, mass=1.0):
# def H(compound_string, T, mass=1.0):
# def S(compound_string, T, mass=1.0):
# def G(compound_string, T, mass=1.0):
#     TK = T + 273.15
#     TK = T + 273.15
#     TK = T + 273.15
#     TK = T + 273.15


import unittest
from auxi.tools.chemistry import thermochemistry as thermo
                          delta=None):
        if type(first) is list and type(second) is list:
            self.assertEqual(len(first), len(second))
            for f, s in zip(first, second):
                self.assertAlmostEqual(f, s)
        else:
            super(ThermoFunctionTester, self).assertAlmostEqual(
                first, second, places, msg, delta)

    def test_load_data_auxi(self):
        thermo.compounds.clear()
        thermo.load_data_auxi()
        self.assertEqual(len(thermo.compounds), 81)

    def test_compound_get_phase_list(self):
        phs = thermo.compounds["Ag"].get_phase_list()
        self.assertEqual(phs[0], "L")
        self.assertEqual(phs[1], "S")

    def test_phase___str__(self):
        phs = thermo.compounds["Ag"].get_phase_list()
        self.assertTrue(len(phs[0].__str__()) > 0)

    def test_cpRecord___str__(self):
        ph = thermo.compounds["Ag"]._phases['L']
        for t, cpr in ph._Cp_records.items():
            self.assertTrue(len(cpr.__str__()) > 0)
            break

    def test_get_datafile_references(self):

# Path: auxi/tools/chemistry/thermochemistry.py
# class CpRecord(Object):
# class Phase(NamedObject):
# class Compound(Object):
#     def __init__(self, dictionary):
#     def __str__(self):
#     def Cp(self, T):
#     def H(self, T):
#     def S(self, T):
#     def __init__(self, dictionary):
#     def _init(self):
#     def __str__(self):
#     def Zero_mag(self, T):
#     def Cp(self, T):
#     def Cp_mag(self, T):
#     def H(self, T):
#     def H_mag(self, T):
#     def S(self, T):
#     def S_mag(self, T):
#     def G(self, T):
#     def G_mag(self, T):
#     def __init__(self, dictionary):
#     def _init(self):
#     def get_phase_list(self):
#     def get_reference(self):
#     def Cp(self, phase, T):
#     def H(self, phase, T):
#     def S(self, phase, T):
#     def G(self, phase, T):
# def _get_default_data_path_():
# def _read_compound_from_factsage_file_(file_name):
# def _split_compound_string_(compound_string):
# def _finalise_result_(compound, value, mass):
# def _read_compound_from_auxi_file_(file_name):
# def write_compound_to_auxi_file(directory, compound):
# def load_data_factsage(path=''):
# def load_data_auxi(path=''):
# def list_compounds():
# def get_datafile_references():
# def molar_mass(compound):
# def Cp(compound_string, T, mass=1.0):
# def H(compound_string, T, mass=1.0):
# def S(compound_string, T, mass=1.0):
# def G(compound_string, T, mass=1.0):
#     TK = T + 273.15
#     TK = T + 273.15
#     TK = T + 273.15
#     TK = T + 273.15


# Path: auxi/tools/chemistry/thermochemistry_test.py
import unittest
from auxi.tools.chemistry import thermochemistry as thermo

                          delta=None):
        if type(first) is list and type(second) is list:
            self.assertEqual(len(first), len(second))
            for f, s in zip(first, second):
                self.assertAlmostEqual(f, s)
        else:
            super(ThermoFunctionTester, self).assertAlmostEqual(
                first, second, places, msg, delta)

    def test_load_data_auxi(self):
        thermo.compounds.clear()
        thermo.load_data_auxi()
        self.assertEqual(len(thermo.compounds), 81)

    def test_compound_get_phase_list(self):
        phs = thermo.compounds["Ag"].get_phase_list()
        self.assertEqual(phs[0], "L")
        self.assertEqual(phs[1], "S")

    def test_phase___str__(self):
        phs = thermo.compounds["Ag"].get_phase_list()
        self.assertTrue(len(phs[0].__str__()) > 0)

    def test_cpRecord___str__(self):
        ph = thermo.compounds["Ag"]._phases['L']
        for t, cpr in ph._Cp_records.items():
            self.assertTrue(len(cpr.__str__()) > 0)
            break

    def test_get_datafile_references(self):

        refs = thermo.get_datafile_references()