Skip to content

New deprecation warning in tests #2118

Open
@bewing

Description

@bewing
  /opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/_pytest/python.py:166: PytestReturnNotNoneWarning: Expected None, but test/ios/test_getters.py::TestGetter::test_get_arp_table[static_arp_entry] returned [{'interface': '', 'mac': '84:B8:02:76:AC:0E', 'ip': '172.29.50.1', 'age': 8.0}, {'interface': 'Vlan20', 'mac': '00:19:07:25:34:4A', 'ip': '172.29.50.2', 'age': 221.0}, {'interface': 'Vlan20', 'mac': '00:24:F7:DD:77:41', 'ip': '172.29.50.3', 'age': -1.0}, {'interface': 'Vlan20', 'mac': '68:05:CA:12:71:C2', 'ip': '172.29.50.10', 'age': 37.0}, {'interface': 'Vlan41', 'mac': '84:B8:02:76:AC:0E', 'ip': '172.29.52.33', 'age': 61.0}, {'interface': 'Vlan41', 'mac': '00:24:F7:DD:77:43', 'ip': '172.29.52.34', 'age': -1.0}, {'interface': 'Vlan41', 'mac': 'A0:99:9B:1C:DF:A7', 'ip': '172.29.52.40', 'age': 3.0}, {'interface': 'Vlan41', 'mac': '00:24:F7:DD:77:43', 'ip': '192.168.81.34', 'age': -1.0}], which will be an error in a future version of pytest.  Did you mean to use `assert` instead of `return`?

we get a warning for every getter test ran.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions