def test_aims_consistency_check_raises_warning(self): with self.assertRaises(Warning): R = aims.Aims(job_dir=self.tmpdir, program='aims', dryrun=True, pbsname=self.pbsname, check_consistency=True) R.submit()
def test_aims_consistency_check_with_files(self): open(self.control_path, 'w').close() open(self.geometry_path, 'w').close() R = aims.Aims(job_dir=self.tmpdir, dryrun=True, program='aims', pbsname=self.pbsname, check_consistency=True) R.submit()
def test_aims_without_pbsname(self): R = aims.Aims(job_dir=self.tmpdir, dryrun=True, program='aims', check_consistency=False) R.submit() pbsfile = os.path.isfile( os.path.join(self.tmpdir, 'job.' + self.foldername + '.arthur')) self.assertTrue(pbsfile)
def test_aims_consistency_check_with_files_adds_walltime(self): open(self.geometry_path, 'w').close() open(self.control_path, 'w').close() R = aims.Aims(job_dir=self.tmpdir, dryrun=True, program='aims', pbsname=self.pbsname, check_consistency=True) R.submit() walltime = False for line in open(self.control_path, 'r'): if 'walltime' in line: walltime = True break self.assertTrue(walltime)