(test_path: Text, reload: bool = False)
return project_meta
load testcases, .env, debugtalk.py functions.
        testcases folder is relative to project_root_directory
        by default, project_meta will be loaded only once, unless set reload to true.

    Args:
        test_path (str): test file/folder path, locate project RootDir from this path.
        reload: reload project meta if set true, default to false

    Returns:
        project loaded api/testcases definitions,
            environments and debugtalk.py functions.
load testcases, .env, debugtalk.py functions.
        testcases folder is relative to project_root_directory
        by default, project_meta will be loaded only once, unless set reload to true.
load testcases . env debugtalk . py functions . testcases folder is relative to project_root_directory by default project_meta will be loaded only once unless set reload to true .
def load_project_meta(test_path: Text, reload: bool = False) -> ProjectMeta:
    """ load testcases, .env, debugtalk.py functions.
        testcases folder is relative to project_root_directory
        by default, project_meta will be loaded only once, unless set reload to true.

    Args:
        test_path (str): test file/folder path, locate project RootDir from this path.
        reload: reload project meta if set true, default to false

    Returns:
        project loaded api/testcases definitions,
            environments and debugtalk.py functions.

    """
    global project_meta
    if project_meta and (not reload):
        return project_meta

    project_meta = ProjectMeta()

    if not test_path:
        return project_meta

    debugtalk_path, project_root_directory = locate_project_root_directory(test_path)

    # add project RootDir to sys.path
    sys.path.insert(0, project_root_directory)

    # load .env file
    # NOTICE:
    # environment variable maybe loaded in debugtalk.py
    # thus .env file should be loaded before loading debugtalk.py
    dot_env_path = os.path.join(project_root_directory, ".env")
    dot_env = load_dot_env_file(dot_env_path)
    if dot_env:
        project_meta.env = dot_env
        project_meta.dot_env_path = dot_env_path

    if debugtalk_path:
        # load debugtalk.py functions
        debugtalk_functions = load_debugtalk_functions()
    else:
        debugtalk_functions = {}

    # locate project RootDir and load debugtalk.py functions
    project_meta.RootDir = project_root_directory
    project_meta.functions = debugtalk_functions
    project_meta.debugtalk_path = debugtalk_path

    return project_meta
def load_project_meta ( test_path : Text , reload : bool = False ) -> ProjectMeta : global project_meta if project_meta and ( not reload ) : return project_meta project_meta = ProjectMeta ( ) if not test_path : return project_meta debugtalk_path , project_root_directory = locate_project_root_directory ( test_path ) # add project RootDir to sys.path sys . path . insert ( 0 , project_root_directory ) # load .env file # NOTICE: # environment variable maybe loaded in debugtalk.py # thus .env file should be loaded before loading debugtalk.py dot_env_path = os . path . join ( project_root_directory , ".env" ) dot_env = load_dot_env_file ( dot_env_path ) if dot_env : project_meta . env = dot_env project_meta . dot_env_path = dot_env_path if debugtalk_path : # load debugtalk.py functions debugtalk_functions = load_debugtalk_functions ( ) else : debugtalk_functions = { } # locate project RootDir and load debugtalk.py functions project_meta . RootDir = project_root_directory project_meta . functions = debugtalk_functions project_meta . debugtalk_path = debugtalk_path return project_meta