Test our awesome examples.
Definition at line 37 of file awesome_examples.py.
◆ _test_examples_dir()
def _test_examples_dir |
( |
|
self, |
|
|
str
|
path_to_glob |
|
) |
| |
|
private |
Internal function to test a directory full of example scripts.
Parameters:
path_to_glob (str): the path to a directory to search for python
scripts.
Definition at line 40 of file awesome_examples.py.
45 Internal function to test a directory full of example scripts.
48 path_to_glob (str): the path to a directory to search for python
54 working_dir = find_file(path_to_glob)
55 examples = sorted(glob.glob(f
'{working_dir}/*.py'))
56 for example
in examples:
57 filename = os.path.basename(example)
58 with self.subTest(msg=filename):
59 result = subprocess.run(
60 [
"basf2",
"-n1", example],
61 stdout=subprocess.PIPE,
62 stderr=subprocess.STDOUT,
64 if result.returncode != 0:
68 sys.stdout.buffer.write(result.stdout)
69 self.assertEqual(result.returncode, 0)
◆ test_examples()
def test_examples |
( |
|
self | ) |
|
The documentation for this class was generated from the following file: