From fa341aebcbfed475587878bd354b406b3f62d3a1 Mon Sep 17 00:00:00 2001 From: shadeofblue Date: Thu, 4 Apr 2019 11:42:39 +0200 Subject: [PATCH] optimize the pattern, thx @jiivan --- tests/golem/test_terms.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/golem/test_terms.py b/tests/golem/test_terms.py index 1833965ad6..f0cfce1c2d 100644 --- a/tests/golem/test_terms.py +++ b/tests/golem/test_terms.py @@ -71,10 +71,7 @@ def test_show(self, read_mock): class TermsOfUseContentsTest(unittest.TestCase): def assertContentsValid(self, contents): matched = re.search( - "([" - "^a-zA-Z0-9_" - "\\n\\<\\>\\/\\.\\:\\\"\\=\\x20\\(\\)\\,\\;\\'\\-\\%" - "])", + r"([^a-zA-Z0-9_\n\<\>\/\.\:\"\=\x20\(\)\,\;\'\-\%])", contents, flags=re.DOTALL) try: