]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: pytest does not like return True from a test
authorDonald Sharp <sharpd@nvidia.com>
Fri, 19 May 2023 16:51:09 +0000 (12:51 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 19 May 2023 16:52:51 +0000 (12:52 -0400)
From running the test:
bgp_remove_private_as/test_bgp_remove_private_as.py::test_bgp_remove_private_as
  /home/sharpd/.local/lib/python3.10/site-packages/_pytest/python.py:198: PytestReturnNotNoneWarning: Expected None, but bgp_remove_private_as/test_bgp_remove_private_as.py::test_bgp_remove_private_as returned True, which will be an error in a future version of pytest.  Did you mean to use `assert` instead of `return`?
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests/topotests/bgp_remove_private_as/test_bgp_remove_private_as.py

index 11342374471194a912c3987940af42fb9d1026ac..e48f81c53dd8eee14b5f7434594e1acac4a7e964 100644 (file)
@@ -409,8 +409,6 @@ def test_bgp_remove_private_as():
         # the old flag after each iteration so we only test the flags we expect.
         _change_remove_type(rmv_type, "del")
 
-    return True
-
 
 if __name__ == "__main__":
     args = ["-s"] + sys.argv[1:]