summaryrefslogtreecommitdiff
path: root/tests/test_html_formatter.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2018-11-28 15:49:16 +0100
committerGeorg Brandl <georg@python.org>2018-11-28 15:49:16 +0100
commit8ec816d3c681b15247d5dac12bc5d291703c8ad0 (patch)
tree1f4c5c4c3f6c79988e116fe03f5ce7853157388f /tests/test_html_formatter.py
parent6de7d2347cbd833ba562ff9fb75deed5f9777316 (diff)
downloadpygments-git-8ec816d3c681b15247d5dac12bc5d291703c8ad0.tar.gz
Fix invalid escapes due to missing raw string prefix.
Diffstat (limited to 'tests/test_html_formatter.py')
-rw-r--r--tests/test_html_formatter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_html_formatter.py b/tests/test_html_formatter.py
index 79990edd..10450c56 100644
--- a/tests/test_html_formatter.py
+++ b/tests/test_html_formatter.py
@@ -100,7 +100,7 @@ class HtmlFormatterTest(unittest.TestCase):
fmt = HtmlFormatter(**optdict)
fmt.format(tokensource, outfile)
html = outfile.getvalue()
- self.assertTrue(re.search("<pre>\s+1\s+2\s+3", html))
+ self.assertTrue(re.search(r"<pre>\s+1\s+2\s+3", html))
def test_linenos_with_startnum(self):
optdict = dict(linenos=True, linenostart=5)
@@ -108,7 +108,7 @@ class HtmlFormatterTest(unittest.TestCase):
fmt = HtmlFormatter(**optdict)
fmt.format(tokensource, outfile)
html = outfile.getvalue()
- self.assertTrue(re.search("<pre>\s+5\s+6\s+7", html))
+ self.assertTrue(re.search(r"<pre>\s+5\s+6\s+7", html))
def test_lineanchors(self):
optdict = dict(lineanchors="foo")