From 4eefce622df558ebddcac00b01401b64f239658b Mon Sep 17 00:00:00 2001 From: Hao Liu <44379968+TheRealHaoLiu@users.noreply.github.com> Date: Mon, 9 Jun 2025 10:27:02 -0400 Subject: [PATCH] Fixes pytest CI error (#6970) ``` /var/lib/awx/venv/awx/lib64/python3.11/site-packages/_pytest/python.py:163: PytestReturnNotNoneWarning: Expected None, but awx/main/tests/unit/test_tasks.py::TestJobCredentials::test_custom_environment_injectors_with_boolean_extra_vars returned ['successful', 0], which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? ``` * Dug into the git blame for this one 060585434abb5456935b7378211813b2ceaacaaa is the commit for any historians. It was wrongfully carried over from a mock pexpect implementation. Our new tests are nice. They don't go as far as trying to run the task so they do not need to mock pexpect. That is why it is safe to remove this code without finding it a new home. Co-authored-by: Chris Meyers --- awx/main/tests/unit/test_tasks.py | 1 - 1 file changed, 1 deletion(-) diff --git a/awx/main/tests/unit/test_tasks.py b/awx/main/tests/unit/test_tasks.py index c0ba988e62..db7efeb122 100644 --- a/awx/main/tests/unit/test_tasks.py +++ b/awx/main/tests/unit/test_tasks.py @@ -1259,7 +1259,6 @@ class TestJobCredentials(TestJobExecution): extra_vars = parse_extra_vars(args, private_data_dir) assert extra_vars["turbo_button"] == "True" - return ['successful', 0] def test_custom_environment_injectors_with_nested_extra_vars(self, private_data_dir, job, mock_me): task = jobs.RunJob()