Skip to content
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

[202405] - snmp package doesn't run due to setup_check_snmp_ready fixture function has more than one 'yield' #15514

Closed
arista-nwolfe opened this issue Nov 12, 2024 · 2 comments

Comments

@arista-nwolfe
Copy link
Contributor

Issue Description

setup_check_snmp_ready was updated recently by #14926

This introduced a for loop over the duthosts but the yield is nested in the for loop resulting in multiple yield calls in a fixture

/data/tests/snmp/conftest.py:11"">fixture function has more than one 'yield'

    @pytest.fixture(scope="module", autouse=True)
    def setup_check_snmp_ready(duthosts, localhost):
        for duthost in duthosts:
...
            yield
...
            localhost.shell(local_command)
/data/tests/snmp/conftest.py:11</error></testcase></testsuite></testsuites>

Possibly the yield was meant to be run after the for loop is completed?

Results you see

yield being called multiple times within fixture setup_check_snmp_ready

Results you expected to see

yield should only be called once within a fixture

Is it platform specific

generic

Relevant log output

No response

Output of show version

No response

Attach files (if any)

No response

@vkjammala-arista
Copy link
Contributor

vkjammala-arista commented Nov 13, 2024

Just noticed this issue, I have raised #15529 addressing this.

@arista-nwolfe
Copy link
Contributor Author

Closing this issue as #15529 has merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants