Test to run all tutorials. Will fail if no tutorial directory is found.
Definition at line 13 of file tutorials.py.
◆ test_tutorials()
def test_tutorials |
( |
|
self | ) |
|
Test supported tutorials.
Definition at line 26 of file tutorials.py.
26 def test_tutorials(self):
28 Test supported tutorials.
30 all_tutorials = sorted(glob.glob(find_file(
'analysis/examples/tutorials/') +
"*.py"))
31 for tutorial
in all_tutorials:
32 filename = os.path.basename(tutorial)
33 if filename
not in self.broken_tutorials:
34 with self.subTest(msg=filename):
35 result = subprocess.run([
'basf2',
'-n1', tutorial], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
36 if result.returncode != 0:
40 sys.stdout.buffer.write(result.stdout)
41 self.assertEqual(result.returncode, 0)
◆ broken_tutorials
Initial value:= ['B2A702-ContinuumSuppression_MVATrain.py',
'B2A703-ContinuumSuppression_MVAExpert.py',
'B2A503-ReadDecayHash.py',
]
list of the broken tutorials (to be removed when they are individually fixed)
Definition at line 17 of file tutorials.py.
The documentation for this class was generated from the following file: