Blob Blame History Raw
From ea34899ee1e975d3b5df79dd063455c9f2778b85 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Mon, 11 Jul 2022 15:41:12 -0700
Subject: [PATCH] test_run_pylint_config: ignore pytest args

This test fails if run through pytest with any args, because
`_run_pylint_config` passes through args from the command line
without checking if the args are actually intended for
pylint-config. We have to pass it some fake args that evaluate
truth-y but don't break anything, to avoid this.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
 tests/config/pylint_config/test_run_pylint_config.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/config/pylint_config/test_run_pylint_config.py b/tests/config/pylint_config/test_run_pylint_config.py
index 17a9509f1..9795e2183 100644
--- a/tests/config/pylint_config/test_run_pylint_config.py
+++ b/tests/config/pylint_config/test_run_pylint_config.py
@@ -18,7 +18,7 @@ def test_invocation_of_pylint_config(capsys: CaptureFixture[str]) -> None:
     with warnings.catch_warnings():
         warnings.filterwarnings("ignore", message="NOTE:.*", category=UserWarning)
         with pytest.raises(SystemExit) as ex:
-            _run_pylint_config()
+            _run_pylint_config([""])
         captured = capsys.readouterr()
         assert captured.err.startswith("usage: pylint-config [options]")
         assert ex.value.code == 2
-- 
2.37.0