Test to run all example scripts.
Definition at line 13 of file examples.py.
◆ _test_examples_dir()
def _test_examples_dir |
( |
|
self, |
|
|
|
path_to_glob, |
|
|
|
broken = [] |
|
) |
| |
|
private |
Internal function to test a directory full of example scripts with an optional list of broken scripts to be skipped.
Parameters:
path_to_glob (str): the path to search for scripts
broken (list(str)): (optional) scripts that are known to be broken and can be skipped
Definition at line 20 of file examples.py.
20 def _test_examples_dir(self, path_to_glob, broken=[]):
22 Internal function to test a directory full of example scripts with an optional list of broken scripts to be skipped.
25 path_to_glob (str): the path to search for scripts
26 broken (list(str)): (optional) scripts that are known to be broken and can be skipped
28 all_egs = sorted(glob.glob(find_file(path_to_glob) +
"*.py"))
30 filename = os.path.basename(eg)
31 if filename
not in broken:
32 with self.subTest(msg=filename):
33 result = subprocess.run([
'basf2',
'-n1', eg], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
34 if result.returncode != 0:
38 sys.stdout.buffer.write(result.stdout)
39 self.assertEqual(result.returncode, 0)
◆ test_calibration_examples()
def test_calibration_examples |
( |
|
self | ) |
|
Test supported calibration examples.
Definition at line 41 of file examples.py.
◆ test_fei_examples()
def test_fei_examples |
( |
|
self | ) |
|
Test supported FEI examples.
Definition at line 53 of file examples.py.
◆ test_fitting_examples()
def test_fitting_examples |
( |
|
self | ) |
|
Test supported fitting examples.
Definition at line 60 of file examples.py.
◆ test_mva_examples()
def test_mva_examples |
( |
|
self | ) |
|
Test supported mva examples.
Definition at line 67 of file examples.py.
◆ test_postmdstidentification_examples()
def test_postmdstidentification_examples |
( |
|
self | ) |
|
Test supported PostMdstIdentification examples.
Definition at line 113 of file examples.py.
◆ test_reconstruction_examples()
def test_reconstruction_examples |
( |
|
self | ) |
|
Test supported reconstruction examples.
Definition at line 80 of file examples.py.
◆ test_simulation_examples()
def test_simulation_examples |
( |
|
self | ) |
|
Test supported simulation examples.
Definition at line 87 of file examples.py.
◆ test_tagging_examples()
def test_tagging_examples |
( |
|
self | ) |
|
Test supported tagging examples.
Definition at line 99 of file examples.py.
◆ test_variablemanager_examples()
def test_variablemanager_examples |
( |
|
self | ) |
|
Test supported variable manager examples.
Definition at line 106 of file examples.py.
The documentation for this class was generated from the following file: