Skip to content

Commit

Permalink
Give full diff list in assert
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanCoding committed Jan 13, 2025
1 parent ae3d701 commit 532332d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion awx/main/tests/functional/test_python_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,19 @@ def test_bootstrap_consistent():
with open('requirements/requirements.txt', 'r') as f:
req_data = f.read()

Check warning on line 22 in awx/main/tests/functional/test_python_requirements.py

View check run for this annotation

Codecov / codecov/patch

awx/main/tests/functional/test_python_requirements.py#L20-L22

Added lines #L20 - L22 were not covered by tests

different_requirements = []

Check warning on line 24 in awx/main/tests/functional/test_python_requirements.py

View check run for this annotation

Codecov / codecov/patch

awx/main/tests/functional/test_python_requirements.py#L24

Added line #L24 was not covered by tests
for req in bootstrap_reqs:
boot_req_name, _ = req.split('=', 1)

Check warning on line 26 in awx/main/tests/functional/test_python_requirements.py

View check run for this annotation

Codecov / codecov/patch

awx/main/tests/functional/test_python_requirements.py#L26

Added line #L26 was not covered by tests
for line in req_data.split('\n'):
if '=' not in line:
continue
req_name, _ = line.split('=', 1)

Check warning on line 30 in awx/main/tests/functional/test_python_requirements.py

View check run for this annotation

Codecov / codecov/patch

awx/main/tests/functional/test_python_requirements.py#L29-L30

Added lines #L29 - L30 were not covered by tests
if req_name == boot_req_name:
assert req == line
different_requirements.append((req, line))
break

Check warning on line 33 in awx/main/tests/functional/test_python_requirements.py

View check run for this annotation

Codecov / codecov/patch

awx/main/tests/functional/test_python_requirements.py#L32-L33

Added lines #L32 - L33 were not covered by tests

assert not different_requirements

Check warning on line 35 in awx/main/tests/functional/test_python_requirements.py

View check run for this annotation

Codecov / codecov/patch

awx/main/tests/functional/test_python_requirements.py#L35

Added line #L35 was not covered by tests


@pytest.mark.skip(reason="This test needs some love")
def test_env_matches_requirements_txt():
Expand Down

0 comments on commit 532332d

Please sign in to comment.