[text] allow calling 'extract_iter' with invalid arguments

This commit is contained in:
Mike Fährmann
2025-03-02 10:44:06 +01:00
parent 472ea737d8
commit db19990a82
2 changed files with 9 additions and 3 deletions

View File

@@ -300,6 +300,12 @@ class TestText(unittest.TestCase):
self.assertEqual(
g(txt, "[", "]", 6), ["a", "d"])
# invalid arguments
for value in INVALID:
self.assertEqual(g(value, "<" , ">") , [])
self.assertEqual(g(txt , value, ">") , [])
self.assertEqual(g(txt , "<" , value), [])
def test_extract_from(self, f=text.extract_from):
txt = "[c][b][a]: xyz! [d][e"