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
评论列表
文章目录