Skip to content

Fixed integration test in test_lib.py #1985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Nov 18, 2022

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)

What kind of change does this PR introduce?

Fix:

=================================== FAILURES ===================================
_________________________________ test_search __________________________________

run_command = <function run_command.<locals>._run at 0x7f37384a3c10>

    def test_search(run_command):
        assert run_command(["update"])
    
        result = run_command(["lib", "search", "--names"])
        assert result.ok
        lines = [l.strip() for l in result.stdout.strip().splitlines()]
        assert "Downloading index: library_index.tar.bz2 downloaded" in lines
        libs = [l[6:].strip('"') for l in lines if "Name:" in l]
    
        expected = {"WiFi101", "WiFi101OTA", "Firebase Arduino based on WiFi101"}
>       assert expected == {lib for lib in libs if "WiFi101" in lib}
E       AssertionError: assert {'Firebase Ar... 'WiFi101OTA'} == {'Firebase Ar...i101_Generic'}
E         Extra items in the right set:
E         'WiFi101_Generic'
E         Full diff:
E           {
E            'Firebase Arduino based on WiFi101',
E            'WiFi101',
E            'WiFi101OTA',
E         -  'WiFi101_Generic',
E           }

test/test_lib.py:504: AssertionError
=========================== short test summary info ============================
FAILED test/test_lib.py::test_search - AssertionError: assert {'Firebase Ar.....
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
=================== 1 failed, 16 passed in 118.54s (0:01:58) ===================

What is the current behavior?

The integration test fails

What is the new behavior?

The integration test succeed

Does this PR introduce a breaking change, and is titled accordingly?

No

@cmaglie cmaglie self-assigned this Nov 18, 2022
@cmaglie cmaglie merged commit a3f5dd8 into arduino:master Nov 18, 2022
@cmaglie cmaglie deleted the fix_integration_test branch November 18, 2022 13:37
@per1234 per1234 added topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project labels Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants