From 18d3eb26978e2b935ede97744d398fb6bfe5982b Mon Sep 17 00:00:00 2001 From: ptmcg Date: Wed, 18 Jan 2023 05:05:12 -0600 Subject: Remove ^ and $ tags from pp.common.url regex - fixes #459 --- tests/test_unit.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/test_unit.py b/tests/test_unit.py index 96cbe28..2bb37a5 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -6405,21 +6405,19 @@ class Test02_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase): self.assertParseAndCheckDict(ppc.url, sample_url, expected, verbose=True) def testCommonUrlExprs(self): - def extract_parts(s, split=' '): + def extract_parts(s, split=" "): return [[_.strip(split)] for _ in s.strip(split).split(split)] test_string = "http://example.com https://blah.org " self.assertParseAndCheckList( - pp.Group(ppc.url)[...], - test_string, - extract_parts(test_string) + pp.Group(ppc.url)[...], test_string, extract_parts(test_string) ) test_string = test_string.replace(" ", " , ") self.assertParseAndCheckList( pp.delimited_list(pp.Group(ppc.url), allow_trailing_delim=True), test_string, - extract_parts(test_string, " , ") + extract_parts(test_string, " , "), ) def testNumericExpressions(self): -- cgit v1.2.1