auxi.tools.chemistry.stoichiometry_test module

This module contains all the code used to test the testee module.

class auxi.tools.chemistry.stoichiometry_test.StoichFunctionTester(methodName='runTest')

Bases: unittest.case.TestCase

The function tester for the stoichiometry module.

assertAlmostEqual(first, second, places=14, msg=None, delta=None)
test_amount()

Test whether the amount of a compound is calculated correctly.

test_amount_fractions()

Test whether compound amount fractions are calculated correctly.

test_amounts()

Test whether compound amounts are calculated correctly.

test_convert_compound()

Test whether compound conversions are calculated correctly.

test_element_mass_fraction()

Test whether an element mass fraction is calculated correctly.

test_element_mass_fractions()

Test whether a list of element mass fraction is calculated correctly.

test_elements()

Test whether the set of elements in a list of compounds is calculated correctly.

test_invalid_characters()

Test whether an exception is raised when a compound formula contains an invalid character.

test_mass()

Test whether the mass of a compound is calculated correctly.

test_mass_fractions()

Test whether compound mass fractions are calculated correctly.

test_masses()

Test whether compound masses are calculated correctly.

test_molar_mass()

Test whether the molar mass of a compound is calculated correctly.

test_stoichiometry_coefficient()

Test whether the stoichiometry coefficient of a specified element in a compound is calculated correctly.

test_stoichiometry_coefficients()

Test whether the stoichiometry coefficients of a specified list of elements in a compound is calculated correctly.