Belle II Software  release-08-01-10
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 19 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 25 of file test_validationfunctions.py.

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

The documentation for this class was generated from the following file: