self.logger.debug("1111Getting into {0}".format(sys._getframe().f_code.co_name))
获取当前函数名 但是只得到了setup
如下即可
self.logger.debug("Getting into {0}".format(self._testMethodName))
width, depth, 算total dir
num = 0
num = sum([num+pow(width,i) for i in range(1,depth)])
更新:
num_dir = lambda m,n:sum([pow(m,i) for i in range(1,n)])
num_dir(width, depth) --------->39 ✔️