bpo-32476 : Add concat function for ElementTree find by jjolly · Pull Request #5251 · python/cpython (original) (raw)
There does not seem to be a precedence for such testing. Is there a similar test for unusually placed '@' or '=' tokens? I could implement a test such as these:
self.assertRaisesRegex(KeyError, ',', e.find, ',/tag[0]')
self.assertRaisesRegex(KeyError, ',', e.find, '.,tag[0]')
self.assertRaisesRegex(KeyError, ',', e.find, './,tag[0]')
self.assertRaisesRegex(KeyError, ',', e.find, '.,/tag[0]')
If I added these tests, wouldn't it be necessary to add similar tests for the other characters in the regex? Do I test for every character in the regex? How far do I go?