From ce1326176a0ea85030ac7d17ad780e9f8b650aff Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Mon, 13 Jan 2025 21:41:06 +0000 Subject: [PATCH] Compiled regexes don't like raw strings, only byte strings --- src/allmydata/test/web/test_web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/allmydata/test/web/test_web.py b/src/allmydata/test/web/test_web.py index fb507d5ce..c213b1983 100644 --- a/src/allmydata/test/web/test_web.py +++ b/src/allmydata/test/web/test_web.py @@ -1968,7 +1968,7 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi def test_CSS_FILE(self): d = self.GET("/tahoe.css", followRedirect=True) def _check(res): - CSS_STYLE=re.compile(r'toolbar\s{.+text-align:\scenter.+toolbar-item.+display:\sinline',re.DOTALL) + CSS_STYLE=re.compile(b'toolbar\\s{.+text-align:\\scenter.+toolbar-item.+display:\\sinline',re.DOTALL) self.failUnless(CSS_STYLE.search(res), res) d.addCallback(_check) return d