Implements Better Tests and Logging

This commit is contained in:
2023-03-01 02:49:28 -03:00
parent 32ca95086a
commit aea34bf214
17 changed files with 1147 additions and 72 deletions

View File

@@ -12,10 +12,44 @@ class TestConfig(unittest.TestCase):
)
self.assertIsInstance(config, Config)
def test_config_raises_exception(self):
def test_config_raises_exception_on_mem_none(self):
with self.assertRaises(ValueError):
Config(
mem="1",
mem=None,
level="b3lyp/aug-cc-pVDZ",
n_atoms=10
)
def test_config_raises_exception_on_mem_zero_or_negative(self):
with self.assertRaises(ValueError):
Config(
mem=0,
level="b3lyp/aug-cc-pVDZ",
n_atoms=10
)
with self.assertRaises(ValueError):
Config(
mem=-1,
level="b3lyp/aug-cc-pVDZ",
n_atoms=10
)
def test_config_raises_exception_on_level_none(self):
with self.assertRaises(ValueError):
Config(
mem=1,
level=None,
n_atoms=10
)
def test_config_raises_exception_on_n_atoms_zero(self):
with self.assertRaises(ValueError):
Config(
mem=1,
level="b3lyp/aug-cc-pVDZ",
n_atoms=0
)