test_spawners.py 文件源码

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

项目:simphony-remote 作者: simphony 项目源码 文件源码
def test_cmd_spawning(self):
        env = os.environ.copy()
        env["PROXY_API_TOKEN"] = "dummy_token"
        path = fixtures.get("remoteappmanager_config.py")
        self.spawner.config_file_path = path

        args = self.spawner.get_args()

        try:
            with self.assertRaises(subprocess.TimeoutExpired):
                subprocess.check_output(
                    self.spawner.cmd + args,
                    timeout=2,
                    env=env,
                    stderr=subprocess.STDOUT)
        except subprocess.CalledProcessError as exc:
            print("Output of the command:\n\n{}".format(
                exc.output.decode(sys.getdefaultencoding())))
            raise
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号