(path: Text)
ensure pytest files are in python module, generate __init__.py on demand
ensure pytest files are in python module, generate __init__.py on demand
ensure pytest files are in python module generate __init__ . py on demand
def __ensure_testcase_module(path: Text) -> NoReturn:
    """ ensure pytest files are in python module, generate __init__.py on demand
    """
    init_file = os.path.join(os.path.dirname(path), "__init__.py")
    if os.path.isfile(init_file):
        return

    with open(init_file, "w", encoding="utf-8") as f:
        f.write("# NOTICE: Generated By HttpRunner. DO NOT EDIT!\n")
def __ensure_testcase_module ( path : Text ) -> NoReturn : init_file = os . path . join ( os . path . dirname ( path ) , "__init__.py" ) if os . path . isfile ( init_file ) : return with open ( init_file , "w" , encoding = "utf-8" ) as f : f . write ( "# NOTICE: Generated By HttpRunner. DO NOT EDIT!\n" )