date=date)
def _extract_patch_ids(self, response):
- id_re = re.compile('<tr id="patch_row:(\d+)"')
+ id_re = re.compile(r'<tr id="patch_row:(\d+)"')
ids = [int(m.group(1))
for m in id_re.finditer(response.content.decode())]
"""Validate presence of correct optin/optout forms."""
- form_re_template = ('<form\s+[^>]*action="%(url)s"[^>]*>'
- '.*?<input\s+[^>]*value="%(email)s"[^>]*>.*?'
- '</form>')
+ form_re_template = (r'<form\s+[^>]*action="%(url)s"[^>]*>'
+ r'.*?<input\s+[^>]*value="%(email)s"[^>]*>.*?'
+ r'</form>')
def setUp(self):
self.secondary_email = 'test2@example.com'
'diff --git a/tools/testing/selftests/powerpc/Makefile'))
# Confirm the trailing no newline marker doesn't end up in the comment
self.assertFalse(message.rstrip().endswith(
- '\ No newline at end of file'))
+ r'\ No newline at end of file'))
# Confirm it's instead at the bottom of the patch
self.assertTrue(diff.rstrip().endswith(
- '\ No newline at end of file'))
+ r'\ No newline at end of file'))
# Confirm we got both markers
- self.assertEqual(2, diff.count('\ No newline at end of file'))
+ self.assertEqual(2, diff.count(r'\ No newline at end of file'))
def test_no_subject(self):
"""Validate parsing a mail with no subject."""