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

@ -50,7 +50,7 @@ class TestGC(TestCase):
self.t.config("gc", "0")
self.t("1 done")
code, out, err = self.t("gctest")
self.assertRegex(out, "1\s+one", "should still have ID")
self.assertRegex(out, r"1\s+one", "should still have ID")
def test_gc_off_mod(self):
"""mod by ID after done with gc off"""
@ -59,7 +59,7 @@ class TestGC(TestCase):
self.t("gctest")
self.t("2 mod +TWO")
code, out, err = self.t("gctest")
self.assertRegex(out, "2\s+two\s+TWO", "modified 'two'")
self.assertRegex(out, r"2\s+two\s+TWO", "modified 'two'")
def test_gc_on_id(self):
"""IDs reshuffle after report when GC on"""
@ -67,8 +67,8 @@ class TestGC(TestCase):
self.t("1 done")
self.t("2 mod +TWO")
code, out, err = self.t("gctest")
self.assertRegex(out, "1\s+two\s+TWO")
self.assertRegex(out, "2\s+three")
self.assertRegex(out, r"1\s+two\s+TWO")
self.assertRegex(out, r"2\s+three")
if __name__ == "__main__":