fix(cli): silence info and warnings in --list mode, add -q/-v flags, bump version to 1.0.1
Build and Publish Release / Build Packages and Publish (push) Successful in 9s

This commit is contained in:
soda64 committed 2026-10-03 09:55:08 +02:00
1 parent e19a4303f8
commit 5fedc44c6b
6 files changed
+64 -21

No files matched your search

+15
View File
@@ -36,6 +36,21 @@ class TestCliIntegration(unittest.TestCase):
parsed = json.loads(stdout_capture.getvalue())
self.assertIn("_meta", parsed)
self.assertIn("hostvars", parsed["_meta"])
self.assertEqual(stderr_capture.getvalue(), "")
finally:
sys.stdout = old_stdout
sys.stderr = old_stderr
def test_cli_quiet_and_verbose(self):
stdout_capture = StringIO()
stderr_capture = StringIO()
old_stdout, old_stderr = sys.stdout, sys.stderr
try:
sys.stdout = stdout_capture
sys.stderr = stderr_capture
code = main(["--check", "-q"])
self.assertEqual(code, 0)
self.assertEqual(stderr_capture.getvalue(), "")
finally:
sys.stdout = old_stdout
sys.stderr = old_stderr