13import validationfunctions
 
   22    Various test cases for the validation utility functions
 
   27        Test if the extraction of the git hash works 
and if not, 
if the
 
   28        functions returns the expected result
 
   39        with tempfile.TemporaryDirectory() 
as td:
 
   43            self.assertTrue(ret 
is None)
 
   48        local_dir = os.environ.get(
"BELLE2_LOCAL_DIR", 
None)
 
   51            self.assertTrue(ret 
is not None)
 
   52            print(f
"This source code has git hash {ret}")
 
   55if __name__ == 
"__main__":
 
Optional[str] get_compact_git_hash(str repo_folder)