From 2376cb11cd1383622c97e52006ccabf12c78fffe Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Tue, 30 Dec 2014 10:37:52 -0500 Subject: Slice the iterable rather than converting to a list and slicing that. --- setuptools/tests/test_easy_install.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'setuptools/tests/test_easy_install.py') diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index ca943948..053b6971 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -10,6 +10,7 @@ import contextlib import textwrap import tarfile import logging +import itertools import pytest @@ -82,7 +83,8 @@ class TestEasyInstallTest(unittest.TestCase): old_platform = sys.platform try: - name, script = [i for i in next(get_script_args(dist))][0:2] + args = next(get_script_args(dist)) + name, script = itertools.islice(args, 2) finally: sys.platform = old_platform -- cgit v1.2.1