Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DeprecationWarning: invalid escape sequence in tests #3426

Closed
wants to merge 11 commits into from
Closed

Fix DeprecationWarning: invalid escape sequence in tests #3426

wants to merge 11 commits into from

Conversation

BoboTiG
Copy link
Contributor

@BoboTiG BoboTiG commented Jan 5, 2019

The issue

Fixes DeprecationWarning: invlid escape sequence in tests.

The fix

Use double backslashes (raw strings would have been OK too).

The checklist

  • [n] Associated issue
  • [n] A news fragment in the news/ directory to describe this fix with the extension .bugfix, .feature, .behavior, .doc. .vendor. or .trivial (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

I do not think adding a NEWs entry is necessary but correct me if I am wrong :)

Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
@jxltom
Copy link
Contributor

jxltom commented Jan 18, 2019

Do you mind link the output of our CI which has this warning? I didn't find our passed Azure CI in windows/linux has these kind of warnings. Thanks!

@jxltom jxltom added the Status: Awaiting Update ⏳ This issue requires more information before assistance can be provided. label Jan 18, 2019
@techalchemy
Copy link
Member

Oooh I know exactly what this refers to. I would prefer raw strings for this fix though, if you don’t mind!

@jxltom jxltom removed the Status: Awaiting Update ⏳ This issue requires more information before assistance can be provided. label Jan 19, 2019
@@ -218,7 +218,7 @@ def mock_version(path):
@pytest.mark.windows
@pytest.mark.skipif(os.name != "nt", reason="Windows test only")
def test_windows_shellquote(self):
test_path = "C:\Program Files\Python36\python.exe"
test_path = r"C:\Program Files\Python36\python.exe"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the presence of 4 backslashes in the original, I'm guessing you'd need 2 backslashes in a raw string and then this should work

@BoboTiG BoboTiG closed this Oct 31, 2019
@BoboTiG BoboTiG deleted the fix-invalid-seq-warnings branch October 31, 2019 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants