Thanks to visit codestin.com
Credit goes to github.com

Skip to content

非脚手架的目录下,无法通过run.py方法调用执行对应的用例 #55

@rongjiasheng

Description

@rongjiasheng

背景:想做一个web接口直接通过接口直接执行不同脚手架下的run.py方法进行测试,方便用例调度,但是因为web服务的路径不在脚手架的目录下,执行用例会报 raise FileNotFoundError(f"未找到项目根目录(缺少{PROJECT_ROOT_FILE}文件,可能不在aomaker项目中)")
def get_db_path() -> Path:
project_root = find_project_root(Path.cwd())

cwd影响到寻址

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions