dxmate.py 文件源码

python
阅读 64 收藏 0 点赞 0 评论 0

项目:DXMate 作者: jtowers 项目源码 文件源码
def run_command(self):
        args = ['sfdx', 'force:apex:test:run', '-r', 'human',
                '-l', 'RunSpecifiedTests', '-n', self.class_name]
        startupinfo = None
        if os.name == 'nt':
            startupinfo = subprocess.STARTUPINFO()
            startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
        p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                             startupinfo=startupinfo, cwd=self.dx_folder)

        p.wait()

        out, err = p.communicate()
        r = p.returncode
        if p.returncode == 0:
            printer.write('\n' + str(out, 'utf-8'))
        else:
            printErr = err
            if err is None or err == '':
                printErr = out
            printer.write('\n' + str(printErr, 'utf-8'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号