sapling/eden/integration/help_test.py
Adam Simpkins 21cad8d24a improve the run_unchecked() API in the integration tests
Summary:
Update `EdenFS.run_unchecked()` to return the full
`subprocess.CompletedProcess` argument rather than just the return code.
This will make it possible for future tests to check the output of the command
in addition to just its return code.

Reviewed By: strager

Differential Revision: D8905491

fbshipit-source-id: 7f17f5d103a06aeb56a3be0618683bd1c017fdf0
2018-07-19 12:42:53 -07:00

26 lines
798 B
Python

#!/usr/bin/env python3
#
# Copyright (c) 2016-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
import unittest
from .lib import edenclient
class HelpTest(unittest.TestCase):
"""
This test verifies the Eden CLI can at least load its Python code.
It can be removed when the remaining integration tests are enabled
on sandcastle.
"""
def test_eden_cli_help_returns_without_error(self) -> None:
with edenclient.EdenFS() as client:
cmd_result = client.run_unchecked("help")
self.assertEqual(0, cmd_result.returncode)