Belle II Software  release-05-02-19
test_prompt_validation_scripts.py
1 import unittest
2 from unittest import TestCase
3 
4 
5 class Test_Prompt(TestCase):
6  """
7  Checking prompt validation scripts directory.
8  """
9 
10  def test_check(self):
11  """
12  Uses b2val-prompt-check to make sure that cripts can all be imported and duplicate names
13  for validations don't exist.
14  """
15  tool_name = "b2val-prompt-check"
16  import subprocess
17  output = ""
18  try:
19  subprocess.check_output(tool_name, stderr=subprocess.STDOUT, universal_newlines=True)
20  except subprocess.CalledProcessError as e:
21  print(e.output)
22  raise e
23 
24 
25 def main():
26  unittest.main()
27 
28 
29 if __name__ == '__main__':
30  main()
test_prompt_validation_scripts.Test_Prompt.test_check
def test_check(self)
Definition: test_prompt_validation_scripts.py:10
main
int main(int argc, char **argv)
Run all tests.
Definition: test_main.cc:77
test_prompt_validation_scripts.Test_Prompt
Definition: test_prompt_validation_scripts.py:5