学习接口测试时,当我把配置文件xx.config和读取配置文件的模块read_config.py放在项目下的同一个包config里时,只需传入文件名xx.config即可实现对配置文件的读取. 但是当我在项目下另一个包里导入read_config.py后,再次传入要读取的配置文件名xx.config,却报错了!
Traceback (most recent call last):
File "C:\Users\wangyi\AppData\Local\Programs\Python\Python36\lib\configparser.py", line 1138, in _unify_values
sectiondict = self._sections[section]
KeyError: 'MOD'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File