MCPcopy
hub / github.com/django/django / test_group_positional

Method test_group_positional

tests/utils_tests/test_regex_helper.py:21–25  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19 self.assertEqual(result, expected)
20
21 def test_group_positional(self):
22 pattern = r"(.*)-(.+)"
23 expected = [("%(_0)s-%(_1)s", ["_0", "_1"])]
24 result = regex_helper.normalize(pattern)
25 self.assertEqual(result, expected)
26
27 def test_group_noncapturing(self):
28 pattern = r"(?:non-capturing)"

Callers

nothing calls this directly

Calls 1

normalizeMethod · 0.45

Tested by

no test coverage detected