def test_fail_invalid_infile(self): '''Failing due to invalid input file.''' tempname = common.get_temporary_filename(self.workroot) nonexisting_infile = os.path.join(self.workdir, tempname) outfile = self.get_output('TiO2.dat') cmdargs = [nonexisting_infile, outfile] with self.assertRaises(ScriptError): dp_dos.main(cmdargs)
def test_fail_invalid_infile(self): '''Failing due to invalid input file.''' tempname = common.get_temporary_filename(self.workroot) nonexisting_infile = os.path.join(self.workdir, tempname) outfile = self.get_output('h2o.234.xyz') cmdargs = ['-o', outfile, nonexisting_infile, '2', '3', '4'] with self.assertRaises(ScriptError): repeatgen.main(cmdargs)
def test_fail_invalid_infile(self): '''Testcase for invocation with invalid infile(s).''' # get unique temporary filename as invalid input file tmpname = common.get_temporary_filename(self.workroot) infile1 = self.get_full_inpath('base.png') infile2 = os.path.join(self.workdir, tmpname) outfile = self.get_full_outpath('hypersurface_cur.dat') cmdargs = [infile1, infile2, '-o', outfile] with common.OutputCatcher() as _: with self.assertRaises(ScriptError): picslide.main(cmdargs)