stefankoegl / python-json-pointer

Resolve JSON Pointers in Python
https://python-json-pointer.readthedocs.org/
Other
140 stars 43 forks source link

DeprecationWarning in tests #50

Closed ghost closed 2 years ago

ghost commented 2 years ago

i know the project doesnt officially use pytest but it seems to support the existing tests as is which is nice, and it gives a bit more information in the output.

when testing with pytest the following warning is emitted due to deprecated syntax. i was going to do a pr to fix it, but wasnt sure if this is relevant when working with json pointers or is something that can be resolved.

===>  Regression tests for py3-jsonpointer-2.2
============================= test session starts ==============================
platform xxxxx -- Python 3.9.10, pytest-7.1.0, pluggy-1.0.0
rootdir: /usr/ports/pobj/py-jsonpointer-2.2-python3/jsonpointer-2.2
collected 19 items

tests.py ...................                                             [100%]

=============================== warnings summary ===============================
tests.py:88
  /usr/ports/pobj/py-jsonpointer-2.2-python3/jsonpointer-2.2/tests.py:88: DeprecationWarning: invalid escape sequence \j
    ("/i\\j", ['i\j']),

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 19 passed, 1 warning in 0.11s =========================
ghost commented 2 years ago

thanks for the quick fix!