Implements Better Tests and Logging
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user