diff --git a/awx/main/tests/unit/test_python_requirements.py b/awx/main/tests/unit/test_python_requirements.py index 6fffc88149..8b7382dd74 100644 --- a/awx/main/tests/unit/test_python_requirements.py +++ b/awx/main/tests/unit/test_python_requirements.py @@ -40,6 +40,7 @@ def test_env_matches_requirements_txt(): if res is False: not_found.append(r) - raise RuntimeError("%s not found in \n\n%s" % (not_found, reqs_actual)) + if len(not_found) > 0: + raise RuntimeError("%s not found in \n\n%s" % (not_found, reqs_actual))