错误:配置解析器。无节错误: 否 节: 'detail'


def configreader(section, key):
config = configparser.ConfigParser()
config.read("../ConfigFiles/baseURL.cfg")
return config.get(section, key)

在pytest模式下运行代码时,遇到" no ection:'depta''错误,但是当代码本身启动时(独立(时,没有错误。

更新:已解决,是语法错误

config.read(" ./configfiles/baseurl.cfg"(

摆脱了'。要从顶级文件夹启动代码。

希望它有帮助。

相关内容

最新更新