Various test cases for the validation utility functions
Definition at line 19 of file test_validationfunctions.py.
◆ 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
32
33
34 return
35
36
37 cwd = os.getcwd()
38
39 with tempfile.TemporaryDirectory() as td:
40
41 os.chdir(str(td))
43 self.assertTrue(ret is None)
44
45 os.chdir(cwd)
46
47
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: