|
list | broken_tutorials = [] |
| list of the broken tutorials (to be removed when they are individually fixed)
|
|
Test to run all B2A6XX tutorials. Will fail if no tutorial directory is found.
Definition at line 22 of file tutorials_B2A6XX.py.
◆ test_tutorials()
def test_tutorials |
( |
|
self | ) |
|
Test supported tutorials.
Definition at line 32 of file tutorials_B2A6XX.py.
32 def test_tutorials(self):
34 Test supported tutorials.
36 configure_logging_for_tests()
37 all_tutorials = sorted(glob.glob(find_file(
'analysis/examples/tutorials/') +
"/B2A6*.py"))
38 for tutorial
in all_tutorials:
39 filename = os.path.basename(tutorial)
40 if filename
not in self.broken_tutorials:
41 with self.subTest(msg=filename):
42 outputfilename = filename.replace(
'.py',
'.root')
43 result = subprocess.run([
'basf2',
'-n100', tutorial,
'-o', outputfilename],
44 stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
45 if result.returncode != 0:
49 sys.stdout.buffer.write(result.stdout)
50 self.assertEqual(result.returncode, 0)
52 if os.path.exists(outputfilename):
53 scanTTree(outputfilename)
The documentation for this class was generated from the following file: