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

[pfc] Fix variable return type #2672

Merged
merged 1 commit into from
Dec 16, 2020

Conversation

neethajohn
Copy link
Contributor

@neethajohn neethajohn commented Dec 15, 2020

Signed-off-by: Neetha John [email protected]

Description of PR

Fixes the error seen during test case collection introduced by #2599. Initialize the variable as a list
https://sonic-jenkins.westus2.cloudapp.azure.com/job/common/job/sonic-mgmt-testing/job/sonic-mgmt-pr/2462/consoleFull

____________________________________________________ ERROR collecting pfc/test_pfc_pause_lossless.py ______________________________________________________
/usr/local/lib/python2.7/dist-packages/pluggy/hooks.py:286: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/local/lib/python2.7/dist-packages/pluggy/manager.py:93: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/usr/local/lib/python2.7/dist-packages/pluggy/manager.py:87: in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
/usr/local/lib/python2.7/dist-packages/_pytest/python.py:234: in pytest_pycollect_makeitem
    res = list(collector._genfunctions(name, obj))
/usr/local/lib/python2.7/dist-packages/_pytest/python.py:410: in _genfunctions
    self.ihook.pytest_generate_tests(metafunc=metafunc)
/usr/local/lib/python2.7/dist-packages/pluggy/hooks.py:286: in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
/usr/local/lib/python2.7/dist-packages/pluggy/manager.py:93: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
/usr/local/lib/python2.7/dist-packages/pluggy/manager.py:87: in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
conftest.py:748: in pytest_generate_tests
    metafunc.parametrize("enum_dut_lossless_prio", generate_priority_lists(metafunc, 'lossless'))
/usr/local/lib/python2.7/dist-packages/_pytest/python.py:1004: in parametrize
    function_definition=self.definition,
/usr/local/lib/python2.7/dist-packages/_pytest/mark/structures.py:125: in _for_parametrize
    parameters = cls._parse_parametrize_parameters(argvalues, force_tuple)
/usr/local/lib/python2.7/dist-packages/_pytest/mark/structures.py:119: in _parse_parametrize_parameters
    ParameterSet.extract_from(x, force_tuple=force_tuple) for x in argvalues
E   TypeError: 'NoneType' object is not iterable

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

How did you verify/test it?

Tried test case collection with the fix. No longer seeing the error

Signed-off-by: Neetha John <[email protected]>
@neethajohn neethajohn merged commit 094d80b into sonic-net:master Dec 16, 2020
@neethajohn neethajohn deleted the fix_pfc_collect branch December 16, 2020 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants