def test_5_jobtype_heppy(self): """test that the jobtype can be determined for heppy""" dataset = Dataset(dataset_name_heppy, dataset_pattern_heppy, cache=False, extract_info=True) self.assertEqual(dataset.jobtype(), 'heppy')
class TestPythia8Dataset(unittest.TestCase): def setUp(self): self.dataset = Dataset(dataset_name_pythia8, dataset_pattern_pythia8, cache=False, extract_info=True, cfg=cfg_name, xsection=1.8e-9) self.dataset.write() self.nfiles = 5 self.ngoodfiles = 5 self.nevents = 50 def test_1_create(self): '''Test dataset creation''' self.assertEqual(len(self.dataset.all_files), self.nfiles) self.assertEqual(len(self.dataset.list_of_good_files()), self.ngoodfiles) self.assertEqual(self.dataset.nfiles(), self.nfiles) self.assertEqual(self.dataset.ngoodfiles(), self.ngoodfiles) self.assertEqual(self.dataset.nevents(), self.nevents) self.assertEqual(self.dataset.jobtype(), 'pythia8')
def test_5_jobtype_fccsw(self): """test that the jobtype can be determined for fccsw""" dataset = Dataset(dataset_name_fccsw, cache=True) self.assertEqual(dataset.jobtype(), 'fccsw')