diff options
author | Nick Pope <nick@nickpope.me.uk> | 2022-10-28 14:51:34 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-10-31 12:31:13 +0100 |
commit | 2bc47d7fe95ec9fc62bc5c0d2408944e5269d9d0 (patch) | |
tree | f5f7d7dffc2493b812837e490c42549031d0af02 /tests/test_runner | |
parent | d3cb91db87b78629c0d2682630e90a048275179e (diff) | |
download | django-2bc47d7fe95ec9fc62bc5c0d2408944e5269d9d0.tar.gz |
Avoided assignment followed by immediate return.
Identified using the following command:
$ pcre2grep --line-number --multiline --recursive \
"(?s)(\n +)(\w+) = [^\n]+\1return \2;?$" \
django docs extras js_tests scripts tests
Diffstat (limited to 'tests/test_runner')
-rw-r--r-- | tests/test_runner/tests.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/test_runner/tests.py b/tests/test_runner/tests.py index 30ea4ea670..c4946c3e58 100644 --- a/tests/test_runner/tests.py +++ b/tests/test_runner/tests.py @@ -156,8 +156,7 @@ class TestSuiteTests(SimpleTestCase): def make_tests(self): """Return an iterable of tests.""" suite = self.make_test_suite() - tests = list(iter_test_cases(suite)) - return tests + return list(iter_test_cases(suite)) def test_shuffle_tests(self): tests = self.make_tests() |