29        Internal function to test a directory full of example scripts with an optional list of broken scripts to be skipped. 
   32            path_to_glob (str): the path to search for scripts 
   33            broken (list(str)): (optional) scripts that are known to be broken and can be skipped 
   37        configure_logging_for_tests()
 
   38        all_egs = sorted(glob.glob(find_file(path_to_glob) + f
"/{filepattern}*.py"))
 
   40            filename = os.path.basename(eg)
 
   41            if filename 
not in broken:
 
   42                with self.subTest(msg=filename):
 
   43                    outputfilename = filename.replace(
'.py', 
'.root')
 
   44                    result = subprocess.run([
'basf2', 
'-n', f
'{nevents}', eg, 
'-o',
 
   45                                            outputfilename], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
 
   46                    if result.returncode != 0:
 
   50                        sys.stdout.buffer.write(result.stdout)
 
   51                    self.assertEqual(result.returncode, 0)
 
   53                    if os.path.exists(outputfilename) 
and isNtuple(outputfilename):
 
   54                        scanTTree(outputfilename)