From 059fb6faefcc97a958bc1e0ed3789abeba246b80 Mon Sep 17 00:00:00 2001 From: Alon Grinberg Dana Date: Fri, 1 Nov 2019 13:19:49 -0400 Subject: [PATCH] fixup! Tests: Added utilTests --- arkane/utilTest.py | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/arkane/utilTest.py b/arkane/utilTest.py index 028486ae537..35f3f0c99d4 100644 --- a/arkane/utilTest.py +++ b/arkane/utilTest.py @@ -47,23 +47,26 @@ class TestThermo(unittest.TestCase): """ Contains unit tests of the util module. """ + @classmethod + def setUpClass(cls): + """ + A method that is run before all unit tests in this class. + """ + cls.data_path = os.path.join(os.path.dirname(__file__), 'data') def test_determine_qm_software(self): """Test identifying the electronic structure software from the log file""" - gaussian_log_path1 = os.path.join(os.path.dirname(__file__), 'data', 'ethylene_G3.log') - gaussian_log_path2 = os.path.join(os.path.dirname(__file__), 'data', 'oxygen.log') - molpro_log_path1 = os.path.join(os.path.dirname(__file__), 'data', 'HOSI_ccsd_t1.out') - molpro_log_path2 = os.path.join(os.path.dirname(__file__), 'data', 'HOSI_ccsd_t1.out') - qchem_log_path1 = os.path.join(os.path.dirname(__file__), 'data', 'CH4_sp_qchem.out') - qchem_log_path2 = os.path.join(os.path.dirname(__file__), 'data', 'co.out') - terachem_log_path_1 = os.path.join(os.path.dirname(__file__), 'data', 'terachem', 'ethane_minimize_output.out') - terachem_log_path_2 = os.path.join(os.path.dirname(__file__), 'data', 'terachem', - 'formaldehyde_sp_terachem_output.out') - terachem_log_path_3 = os.path.join(os.path.dirname(__file__), 'data', 'terachem', - 'formaldehyde_sp_terachem_results.dat') - terachem_log_path_4 = os.path.join(os.path.dirname(__file__), 'data', 'terachem', 'formaldehyde_coords.xyz') - terachem_log_path_5 = os.path.join(os.path.dirname(__file__), 'data', 'terachem', - 'formaldehyde_output.geometry') + gaussian_log_path1 = os.path.join(self.data_path, 'gaussian', 'ethylene_G3.log') + gaussian_log_path2 = os.path.join(self.data_path, 'gaussian', 'oxygen.log') + molpro_log_path1 = os.path.join(self.data_path, 'molpro', 'HOSI_ccsd_t1.out') + molpro_log_path2 = os.path.join(self.data_path, 'molpro', 'molpro_mrci+q.out') + qchem_log_path1 = os.path.join(self.data_path, 'qchem', 'CH4_sp.out') + qchem_log_path2 = os.path.join(self.data_path, 'qchem', 'co.out') + terachem_log_path_1 = os.path.join(self.data_path, 'terachem', 'ethane_minimize_output.out') + terachem_log_path_2 = os.path.join(self.data_path, 'terachem', 'formaldehyde_sp_terachem_output.out') + terachem_log_path_3 = os.path.join(self.data_path, 'terachem', 'formaldehyde_sp_terachem_results.dat') + terachem_log_path_4 = os.path.join(self.data_path, 'terachem', 'formaldehyde_coords.xyz') + terachem_log_path_5 = os.path.join(self.data_path, 'terachem', 'formaldehyde_output.geometry') non_ess_log_path = os.path.join(os.path.dirname(__file__), 'data', 'methoxy.py') self.assertIsInstance(determine_qm_software(gaussian_log_path1), GaussianLog)