diff options
| author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2018-09-28 18:57:12 +0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-09-28 09:57:12 -0400 |
| commit | 8ef8bc0f64c463684268a7c55f3d3da4de066c0d (patch) | |
| tree | 9c3ab782c6382bdbc91363d0dd5513df83381903 /django/test/testcases.py | |
| parent | 4fc8fb7ddaad495d45d53df58b2d13115857b3c7 (diff) | |
Refs #28909 -- Simplifed code using unpacking generalizations.
Diffstat (limited to 'django/test/testcases.py')
| -rw-r--r-- | django/test/testcases.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/test/testcases.py b/django/test/testcases.py index 7aec0b406b..f327e53561 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -614,8 +614,7 @@ class SimpleTestCase(unittest.TestCase): def _assertFooMessage(self, func, cm_attr, expected_exception, expected_message, *args, **kwargs): callable_obj = None if args: - callable_obj = args[0] - args = args[1:] + callable_obj, *args = args cm = self._assert_raises_or_warns_cm(func, cm_attr, expected_exception, expected_message) # Assertion used in context manager fashion. if callable_obj is None: |
