Belle II Software  release-05-02-19
ValidationFunctionstTest Class Reference
Inheritance diagram for ValidationFunctionstTest:
Collaboration diagram for ValidationFunctionstTest:

Public Member Functions

def test_git_hash (self)
 

Detailed Description

Various test cases for the validation utility functions

Definition at line 12 of file test_validationfunctions.py.

Member Function Documentation

◆ test_git_hash()

def test_git_hash (   self)
Test if the extraction of the git hash works and if not, if the
functions returns the expected result

Definition at line 18 of file test_validationfunctions.py.

18  def test_git_hash(self):
19  """
20  Test if the extraction of the git hash works and if not, if the
21  functions returns the expected result
22  """
23 
24  # fixme: disabled for now
25  # test disabled for now, until a way to run this properly on the
26  # build bot can be found
27  return
28  # noinspection PyUnreachableCode
29 
30  cwd = os.getcwd()
31 
32  with tempfile.TemporaryDirectory() as td:
33  # switch to this folder
34  os.chdir(str(td))
36  self.assertTrue(ret is None)
37 
38  os.chdir(cwd)
39 
40  # in the source folder, we should get a sensible output
41  local_dir = os.environ.get('BELLE2_LOCAL_DIR', None)
42  if local_dir:
44  self.assertTrue(ret is not None)
45  print("This source code has git hash {}".format(ret))
46 
47 

The documentation for this class was generated from the following file:
validationfunctions.get_compact_git_hash
Optional[str] get_compact_git_hash(str repo_folder)
Definition: validationfunctions.py:44