24 def test_it(self):
25 """Only one test here ..."""
27 metadata = basf2.get_file_metadata(inputfile)
28 inputtags = metadata.getDatabaseGlobalTag()
29 self.assertNotEqual(inputtags, "")
30
32 basf2.conditions.globaltags = ["A", "B", "C", "A", "B", "C", "C", "A"]
34 p = basf2.Path()
35 p.add_module("RootInput", inputFileName=inputfile)
36 p.add_module("RootOutput", outputFileName="test.root")
37 basf2.process(p, 3)
38 with open("info.json") as jobinfo:
39 data = json.load(jobinfo)
40
41 self.assertIn('output_files', data, "Expecting output file info")
42 self.assertEqual(len(data['output_files']), 1, "Expecting exactly one output file")
43 fileinfo = data['output_files'][0]
44
45 self.assertEqual(fileinfo['metadata']['globalTag'], f"A,B,C,{inputtags}",
46 "Globaltags not forwarded correctly")
47 self.assertEqual(fileinfo['stats']['events'], 3, "Number of events is wrong")
48
49
def require_file(filename, data_type="", py_case=None)
def clean_working_directory()