Skip to content

Commit

Permalink
Fixes pytest CI error
Browse files Browse the repository at this point in the history
```
  /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
  0605854 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.
  • Loading branch information
chrismeyersfsu authored and djyasin committed Sep 11, 2024
1 parent 7c0bca4 commit 5d07476
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion awx/main/tests/unit/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,6 @@ def test_custom_environment_injectors_with_boolean_extra_vars(self, job, private
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()
Expand Down

0 comments on commit 5d07476

Please sign in to comment.