Fix SyntaxWarning invalid escape sequence in Python code (#3433)

This commit is contained in:
Christian Clauss 2024-05-03 02:22:33 +02:00 committed by GitHub
parent 380c740ff0
commit b7551cbba6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 156 additions and 156 deletions

View file

@ -79,16 +79,16 @@ class TestUndoStyle(TestCase):
"""Test that 'rc.undo.style:side' generates the right output"""
self.t.config("undo.style", "side")
code, out, err = self.t("undo", input="n\n")
self.assertNotRegex(out, "-tags:\s*\n\+tags:\s+tag")
self.assertRegex(out, "tags\s+tag\s*")
self.assertNotRegex(out, "-tags:\\s*\n\\+tags:\\s+tag")
self.assertRegex(out, r"tags\s+tag\s*")
@unittest.expectedFailure # undo diffs are not supported
def test_undo_diff_style(self):
"""Test that 'rc.undo.style:diff' generates the right output"""
self.t.config("undo.style", "diff")
code, out, err = self.t("undo", input="n\n")
self.assertRegex(out, "-tags:\s*\n\+tags:\s+tag")
self.assertNotRegex(out, "tags\s+tag\s*")
self.assertRegex(out, "-tags:\\s*\n\\+tags:\\s+tag")
self.assertNotRegex(out, r"tags\s+tag\s*")
def test_undo_diff_operations(self):
code, out, err = self.t("undo", input="n\n")