pydoit / doit

CLI task management & automation tool
http://pydoit.org
MIT License
1.87k stars 175 forks source link

fix test warnings #296

Closed moltob closed 5 years ago

moltob commented 5 years ago

Unit tests raise these warnings:

============================== warnings summary ===============================
tests\test_cmd_completion.py:90
  C:\projects\doit\tests\test_cmd_completion.py:90: DeprecationWarning: invalid escape sequence \]
    assert ('"(-s|--lll)"{-s,--lll}"[my desc [b\]a]" \\' ==
tests\test_cmd_completion.py:97
  C:\projects\doit\tests\test_cmd_completion.py:97: DeprecationWarning: invalid escape sequence \]
    assert ('''"(-s|--lll)"{-s,--lll}"[my \\"des'c [b\]a]" \\''' ==
-- Docs: https://docs.pytest.org/en/latest/warnings.html

This PR fixes the two invalid escape sequences by replacing \] with \\].

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 99.026% when pulling 80e3a72cf990ab9ceb00422b47b48f500d27fc5c on moltob:feature/fix-test-warnings into cf0dedf0d9fb9ad77c613e64a70e7dd03aaec199 on pydoit:master.

moltob commented 5 years ago

@schettino72 Verified that warnings are gone on Linux and Windows, PR ready for review.

schettino72 commented 5 years ago

thanks.

How do you see these warnings when running tests?

moltob commented 5 years ago

Both CIs showed them, also see https://docs.pytest.org/en/latest/warnings.html.

schettino72 commented 5 years ago

ah ok. i see it. on my local machine it shows only once after i modify that line... tried to use -W without success, they always hide it after first run...

I guess i will change it to error, I usually dont read CI tracebacks unless something fails.