def get_test_path(filename):
frame = inspect.stack()[1]
module = inspect.getmodule(frame[0])
path = os.path.realpath(module.__file__)
root = os.path.abspath(os.path.join(path, os.pardir))
return os.path.join(root, 'test_data', filename)
评论列表
文章目录