diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2020-05-10 13:03:39 -0700 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-05-11 12:01:28 +0200 |
| commit | d6aff369ad33457ae2355b5b210faf1c4890ff35 (patch) | |
| tree | 4c9d43311078bd81098e8a9fe9ff89fe007e921e /tests/inspectdb | |
| parent | 23f6fbdd93cd668740e3a1cd6d8c8259f380c0fe (diff) | |
Refs #30116 -- Simplified regex match group access with Match.__getitem__().
The method has been available since Python 3.6. The shorter syntax is
also marginally faster.
Diffstat (limited to 'tests/inspectdb')
| -rw-r--r-- | tests/inspectdb/tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py index afe89e0dda..910082510a 100644 --- a/tests/inspectdb/tests.py +++ b/tests/inspectdb/tests.py @@ -52,7 +52,7 @@ class InspectDBTestCase(TestCase): output = out.getvalue() def assertFieldType(name, definition): - out_def = re.search(r'^\s*%s = (models.*)$' % name, output, re.MULTILINE).groups()[0] + out_def = re.search(r'^\s*%s = (models.*)$' % name, output, re.MULTILINE)[1] self.assertEqual(definition, out_def) return assertFieldType |
