0

def test_login(): print("Login to application")

def test_checkout():
    print("Checkout")

    def test_logout():
        print("Logout From application")

warnings summary
....\anaconda3\lib\site-packages\pyreadline\py3k_compat.py:19 C:\Users\hp\anaconda3\lib\site-packages\pyreadline\py3k_compat.py:19: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collect ions.abc' is deprecated since Python 3.3, and in 3.10 it will stop working return isinstance(x, collections.Callable)

Christian
  • 4,902
  • 4
  • 24
  • 42
Gregg m
  • 73
  • 2
  • 8
  • That's a warning, not an error (so your tests should pass despite the message), and it seems pretty clear. Are you having trouble understanding the warning message? – larsks Jun 13 '22 at 21:33
  • As mentioned above, just a deprecation warning. "In Python 3.3 "abstract base classes" in collections (like MutableMapping or MutableSequence) were moved to second-level module collections.abc.", see https://stackoverflow.com/questions/53978542/how-to-use-collections-abc-from-both-python-3-8-and-python-2-7 – Christian Jun 13 '22 at 21:46

1 Answers1

0

As stated in the Pytest docs related to warning.

By default pytest will display DeprecationWarning and PendingDeprecationWarning warnings from user code and third-party libraries, as recommended by PEP-0565. This helps users keep their code modern and avoid breakages when deprecated warnings are effectively removed.

In your case, it seems to come from a third party library (pyreadline) that is importing collections in a way that will not be supported anymore in Python 3.10. So you may upgrade the library if a further version fixes this import or choose to disable or filter this warning in Pytest. In this case, you will find in the Pytest docs a set of gradual options to do so.

Romain
  • 19,910
  • 6
  • 56
  • 65