-
Notifications
You must be signed in to change notification settings - Fork 993
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip * wip * wip * wip * make sure CLI can be called twice
- Loading branch information
1 parent
a930709
commit 2202b35
Showing
3 changed files
with
60 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from conan.api.conan_api import ConanAPI | ||
from conan.cli.cli import Cli | ||
from conans.test.utils.mocks import RedirectedTestOutput | ||
from conans.test.utils.test_files import temp_folder | ||
from conans.test.utils.tools import redirect_output | ||
|
||
|
||
def test_cli(): | ||
""" make sure the CLi can be reused | ||
https://github.com/conan-io/conan/issues/14044 | ||
""" | ||
folder = temp_folder() | ||
api = ConanAPI(cache_folder=folder) | ||
cli = Cli(api) | ||
cli2 = Cli(api) | ||
|
||
stdout = RedirectedTestOutput() | ||
stderr = RedirectedTestOutput() | ||
with redirect_output(stderr, stdout): | ||
cli.run(["list", "*"]) | ||
cli.run(["list", "*"]) | ||
cli2.run(["list", "*"]) | ||
cli.run(["list", "*"]) |